Grid API
ColumnResizeApi<T>
API functions for managing column resizing in the grid.
Type parameters
Type parameter |
---|
T |
Properties
- Name
getColumnWidth
- Type
- (column: ColumnOrColumnId<T>) => number
- Description
Returns the configuration width of a column, which might differ from the rendered width.
- Name
getVisualColumnWidth
- Type
- (column: ColumnOrColumnId<T>) => number
- Description
Returns the actual rendered width in pixels of a column. Returns
0
for hidden or unrecognized columns. Considers all width settings like max, min, and free width ratios.
- Name
isColumnResizable
- Type
- (column: ColumnOrColumnId<T>) => boolean
- Description
Checks if a column is resizable based on its definition.
- Name
resizeColumnExn
- Type
- (column: ColumnOrColumnId<T>, newWidth: number) => void
- Description
Resizes a specified column to a new width. Throws an error if the column is not recognized.
- Name
resizeColumnsExn
- Type
- (columns: Record<string, number>) => void
- Description
Bulk resizes columns. Provide an object with column Ids as keys and their new widths as values. Throws an error for unrecognized columns.