Column
23 Sep 20252 minutes to read
Interface for a class Column
Properties
allowResizing boolean
If allowResizing set to false, it disables resize option of a particular column.
Defaults to true
allowSorting boolean
If allowSorting set to false, then it disables sorting option of a particular column.
By default all columns are sortable.
Defaults to true
clipMode ClipMode
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- Displays ellipsis when the cell content overflows its area
also it will display tooltip while hover on ellipsis applied cell.
Defaults to Ellipsis
customAttributes { : }
The CSS styles and attributes of the content cells of a particular column can be customized.
Defaults to null
customFormat { : }
It is used to change display value with the given format and does not affect the original data.
Gets the format from the user which can be standard or custom
number
and date formats.
Defaults to null
field string
Defines the field name of column which is mapped with mapping name of DataSource.
The bounded columns can be sort, filter and group etc.,
The field name must be a valid JavaScript identifier,
the first character must be an alphabet and should not contain spaces and special characters.
Defaults to ’’
format string|NumberFormatOptions|DateFormatOptions
It is used to change display value with the given format and does not affect the original data.
Gets the format from the user which can be standard or custom
number
and date formats.
Defaults to null
headerTemplate string|Function
Defines the column template as string or HTML element ID which is used to add customized element in the column header.
Defaults to null
headerText string
Defines the header text of column which is used to display in column header.
If headerText is not defined, then field name value will be assigned to header text.
Defaults to ’’
headerTextAlign TextAlign
Define the alignment of column header which is used to align the text of column header.
Defaults to null
hideAtMedia string
Column visibility can change based on Media Queries.
hideAtMedia accepts only valid Media Queries.
Defaults to ’’
isPrimaryKey boolean
If isPrimaryKey is set to true, considers this column as the primary key constraint.
Defaults to false
maxWidth string|number
Defines the maximum width of the column in pixel or percentage, which will restrict resizing beyond this pixel or percentage.
Defaults to ’’
minWidth string|number
Defines the minimum width of the column in pixels or percentage.
Defaults to ’’
sortComparer SortComparer|string
Defines the custom sort comparer function.
The sort comparer function has the same functionality like
Array.sort sort comparer.
Defaults to null
template string|Function
Defines the column template that renders customized element in each cell of the column.
It accepts either template string or HTML element ID.
Defaults to null
textAlign TextAlign
Defines the alignment of the column in both header and content cells.
Defaults to Left
type string
Defines the data type of the column.
Defaults to null
width string|number
Defines the width of the column in pixels or percentage.
Defaults to ’’