ColumnProps

Props

The following table outlines the props for the ColumnProps:

NameTypeDefaultDescription
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 GroupDropArea and is excluded from group-by operations.

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 autoHeight only on columns whose template content requires height adjustment. Simple text-wrapped columns should rely on textWrapSettings instead.

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 CellClassProps object with the following properties:

  • cellType – Identifies the structural role of the cell: Header, Content, or Aggregate. Useful for styling header, data, or summary cells.
  • column – The column configuration object associated with the cell.
  • data – The full data object for the row containing the cell, enabling conditional styling based on field values.
  • rowIndex – The zero-based index of the row.
clipMode
ClipMode | string
ClipMode.Ellipsis | 'Ellipsis'

Defines the cell content's overflow mode. The available modes are:

  • Clip - Truncates the cell content when it overflows its area.
  • Ellipsis - Displays ellipsis when the cell content overflows its area.
  • EllipsisWithTooltip - Applies an ellipsis to overflowing cell content and displays a tooltip on hover for enhanced readability.
colSpan
number | boolean | ((args?: CellSpanArgs<T>) => number | boolean)
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 enableAutoSpan allows it. When set to false, the cell is never auto-spanned.

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
ComponentType<EditTemplateProps<T>> | ReactElement | string
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
ComponentType<FilterTemplateProps> | ReactElement | string
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., C2 for currency or custom NumberFormatOptions/DateFormatOptions). Applied before rendering without altering the original data.

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
AggregateType | AggregateType[] | string | string[]
null

Defines the aggregate function (e.g., sum, average) to apply for group captions when this column is used in grouping. When grouping by this column, the specified aggregate function calculates summary values for each group and displays them in the group caption. For example, setting groupCaptionAggregateType to sum will display the total sum of the grouped values in the group caption when this column is used for grouping. This property enhances the grouping feature by providing summary information directly in the group headers, improving data analysis and readability when working with grouped data. Note: This property is only applicable when the column is used in grouping operations and an aggregate function is specified. It does not affect columns that are not grouped or do not have an aggregate function defined. Not applicable for groupSettings.type set to groupRows.

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 Checkbox in the column definition. The header checkbox allows users to select or deselect all rows at once. To disable the select‑all or deselect‑all functionality, set headerCheckbox to false in the checkbox column definition.

headerTemplate
ComponentType<ColumnHeaderTemplateProps> | ReactElement | string
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 field name if not set. Provides a user-friendly label for the column.

headerTextAlign
TextAlign | string
-

Aligns text specifically in the header cell (e.g., Left, Right, Center). Overrides textAlign for header-specific styling.

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
number | boolean | ((args?: CellSpanArgs<T>) => number | boolean)
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 enableAutoSpan allows it. When set to false, the cell is never auto-spanned.

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.

  • referenceValue - The value from the reference row to compare. Typically the current row being sorted.
  • comparerValue - The value from the comparer row to compare against. Used to determine sort order.
  • referenceRowData - Optional. Complete data object of the reference row. Useful for advanced sorting logic.
  • comparerRowData - Optional. Complete data object of the comparer row. Useful for advanced sorting logic.
  • sortDirection - Optional. Current sort direction: 'Ascending', 'Descending', or ''. Helps determine sort logic flow.
template
ComponentType<ColumnTemplateProps<T>> | ReactElement | string
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 aria-label behavior for cells rendered using column templates. Improves accessibility by providing screen readers with meaningful labels when templates are used in grid columns.

textAlign
TextAlign | string
TextAlign.Left | 'Left'

Aligns text in header and content cells (e.g., Left, Right, Center). Enhances visual consistency across the column.

type
ColumnType | string
null

Defines the column’s data type (e.g., string, number, date, or checkbox). The type determines how the grid handles sorting, filtering, formatting, and row selection behavior. By default, the column type is automatically assigned based on the value of the first cell in each column. If the first cell is empty, the column type must be defined manually. Template columns, command columns, and checkbox columns do not require a type definition.

validationRules
null

Validation rules for editing (e.g., required, minLength). Ensures valid input during create or update operations.

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 width is undefined and column DOM virtualization is enabled, the default width is '100px'.