ColumnProps
Props
The following table outlines the props for the ColumnProps:
| Name | Type | Default | Description |
|---|---|---|---|
| allowEdit | boolean | true | If false, disables editing for the column's cells in edit mode. Defaults to true, allowing editing. |
| allowFilter | boolean | true | If false, disables filtering for the column, hiding filter bar or menu. Defaults to true, enabling filtering. |
| allowGroup | boolean | true | If false, disables grouping for this specific column.
Defaults to true, allowing the column to be used in group operations.
When false, the column cannot be dragged to the |
| allowSearch | boolean | true | If true, enables searching for the column in the grid's search bar. |
| allowSort | boolean | true | If false, disables sorting for the column, preventing header click sorting. Defaults to true, enabling sorting. |
| autoHeight | boolean | false | Enables automatic row height adjustment based on the rendered content of this column.
When set to true, the grid measures the actual height of the column’s rendered
content (including template output) and expands the corresponding row so that no
content is clipped.
This property is intended for columns that use custom templates where text may wrap
or dynamically expand. To calculate accurate row heights, the grid must render all
columns in the row, which disables column DOM virtualization for that row.
Use |
| cellClass | string | ((props?: CellClassProps<T>) => string) | - | Applies a CSS class to individual grid cells either globally or conditionally.
Accepts a static class name or a callback function that returns a class name based on cell context.
The callback receives a
|
| clipMode | ClipMode | string | ClipMode.Ellipsis | 'Ellipsis' | Defines the cell content's overflow mode. The available modes are:
|
| colSpan | 1 | Specifies the number of columns the cell should span.
When set to a number greater than 1, the cell merges horizontally.
When set to true, the grid may automatically span adjacent matching cells if | |
| contextMenuItems | (ContextMenuItem | ContextMenuItemProps)[] | undefined | Defines context menu items to display when right-clicking on cells in the column. Supports default items such as Edit, Delete, Save, Cancel, SortAscending, etc. Also supports customized items through the ContextMenuItemProps configuration object for application-specific actions or commands. |
| defaultValue | ValueType | null | null | Default value for the column when adding new records. Ensures consistent initial values for new entries. |
| disableHtmlEncode | boolean | true | If false, encodes HTML in header and content cells, preventing raw HTML rendering. When true, allows raw HTML but requires caution for security. |
| displayAsCheckBox | boolean | false | If true, displays boolean values as checkboxes instead of text. |
| edit | {} | Custom edit cell configuration for advanced editing, such as custom input types or validation logic. Enhances editing flexibility. | |
| editTemplate | null | Template for the column's edit UI, as a string, function, or HTML element ID. Customizes the editor during editing. | |
| field | string | '' | Defines the field name that maps the column to a specific data source property for data binding operations. Enables sorting and filtering functionality based on the specified field name within the dataset. Strongly recommended to avoid JavaScript reserved words and special characters in the field name for optimal compatibility. |
| filter | {} | Defines the filter options to customize filtering for the particular column. | |
| filterTemplate | null | Template for the column's filter UI, as a string, function, or HTML element ID. Customizes the filter interface. | |
| format | string | NumberFormatOptions | DateFormatOptions | null | Defines the format for cell values (e.g., |
| getCommandItems | (event: CommandItemEvent) => React.ReactElement<CommandItemProps>[] | undefined | Callback function that returns command item buttons for each row in the grid. Receives the current row's data and column configuration to determine which commands to display. |
| groupCaptionAggregateType | null | Defines the aggregate function (e.g., | |
| headerCheckbox | boolean | true | Specifies whether the header checkbox is displayed in the checkbox column.
By default, it is enabled when the column type is set to |
| headerTemplate | null | Renders custom content in the header cell using a template string, function, or HTML element ID. Supports advanced header customization like icons or buttons. | |
| headerText | string | - | Sets the text displayed in the column header. Defaults to the |
| headerTextAlign | TextAlign | string | - | Aligns text specifically in the header cell (e.g., |
| headerValueAccessor | (props?: HeaderValueAccessorProps) => ValueType | T | - | Fires when a header cell begins to render or refresh in the grid. Allows transformation of header text for display purposes only. Does not affect the underlying data source. |
| isPrimaryKey | boolean | false | If true, marks the column as a primary key for unique record identification. Critical for editing, adding and deleting operations. |
| rowSpan | 1 | Specifies the number of rows the cell should span.
When set to a number greater than 1, the cell merges vertically.
When set to true, the grid may automatically span matching cells in subsequent rows if | |
| showInColumnChooser | boolean | true | Controls whether the column appears in the column chooser dialog. Set to false to hide the column from the chooser. By default (true), the column is shown. Useful for columns that should always be visible or hidden from user control. |
| sortComparer | (referenceValue: ValueType, comparerValue: ValueType, referenceRowData?: T, comparerRowData?: T, sortDirection?: string) => number | string | - | Fires when a sorting operation begins on a each grid column. Allows overriding the default sorting behavior with custom logic by comparing reference and comparer values. Advanced custom sorting can be implemented using complete row data and the current sort direction context.
|
| template | null | Renders custom content in data cells using a template string, function, or HTML element ID. Enables complex or dynamic cell layouts. | |
| templateSettings | {} | Configures the | |
| textAlign | TextAlign | string | TextAlign.Left | 'Left' | Aligns text in header and content cells (e.g., |
| type | ColumnType | string | null | Defines the column’s data type (e.g., |
| validationRules | null | Validation rules for editing (e.g., | |
| valueAccessor | (props?: ValueAccessorProps<T>) => ValueType | T | - | Fires when a data cell begins to render or refresh in the grid. Allows transformation of cell values for display purposes only. Does not affect the underlying data source. |
| visible | boolean | true | If false, hides the column. Defaults to true for visibility. Useful for conditional display based on user roles or state. |
| width | string | number | '' | '100px' | Defines the column width in pixels (e.g., 100 or '100').
Controls the column's size in the grid layout.
When |