DataGridOptions / PartialDataGridOptions

Description

A DataGridOptions is an interface that exposes properties to specify various options on the DataGrid.

DataGridOptions can be retreived at runtime by calling the DataGrid.getOptions() function, and can be set at runtime by calling the DataGrid.setOptions(options) function.

Properties

Property

Type

Default Value

Description

allowColumnReorder

boolean

true

true if the columns can be reordered through the user interface, otherwise false. By default, true.

allowEdit

boolean

false

true if the data items can be edited by the user through the user interface, otherwise false. By default, false.

allowFilter

boolean

false

true if the FilterRow is visible and the user can filter the grid’s data using the FilterCells, otherwise false. By default, false.

columnDefinitions

ColumnDefinition[]

[]

An array representing the ColumnDefinition to display in the DataGrid.

commitMode

CommitMode

Cell

A condition that determines when to start the validation and commit process of an item being edited.

containerHeights

ContainerHeightCollection

{}

Determines the height of data rows and group headers.

dataSource

DataSource

undefined

A DataSource representing the data to display in the DataGrid.

editorDefinitions

EditorDefinitionCollection

{}

A collection of key/value pairs that links ids to EditorDefinition.

editTriggers

EditTriggers

{ onKeyPress: OnKeyPress.f2 | OnkeyPress.space,

onMouseAction: OnMouseAction.doubleClick,

onNavigationFocus: null}

EditTriggers conditions that determines when to start editing a dataCell.

enableAlternateRowStyle

boolean

true

true if the rows can be set with the alternative background color, otherwise false. By default, true.

experimental

ExperimentalOptions

{ tooltipMode: “never”, statDefinitions: {}}

Represents options that are provided on an experimental basis, which may be removed or changed at any time.

filterDefinitions

FilterDefinitionCollection

{}

A collection of key/value pairs that links fields to FilterDefinition arrays.

filterLogicalMode

FilterLogicalMode

And

Or if the data is filtered inclusively, otherwise And. By default, And.

filterOptions

FilterOptionsByType

{ types: {}, fields: {} }

A collection of FilterOptions to apply to a filter for specific data types of fields.

formatDefinitions

FormatDefinitionCollection

{}

A collection of key/value pairs that links ids to FormatDefinition.

groupConfigurations

GroupConfigurationCollection

{}

A collection of key/value pairs that links fields to GroupConfiguration. A GroupConfiguration is applied to a corresponding GroupDefinition.

groupDefinitions

GroupDefinition[]

[]

An array of GroupDefinition used to group data by corresponding fields.

layoutMode

LayoutMode

"infinite"

Displays all items of the data source on a single page.

layoutModeOptions

LayoutModeOptionsCollection

{"paging": {type: "paging", itemsPerPage: 100}}

When LayoutMode is set to Paging, will display 100 items per page.

imageDefinitions

ImageDefinitionCollection

{}

A collection of key/value pairs that links ids to ImageDefinition.

selectionMode

SelectionMode

Multiple

The mode of selection. Currently available values are None (selection is deactivated) and Multiple (many rows can be selected).

selectionUnit

SelectionUnit

Row

The unit of selection. Currently available values are Row (selection of dataItems) and Cell (selection of dataCells).

sortConfigurations

SortConfigurationCollection

{}

A collection of key/value pairs that links fields to SortConfiguration. A SortConfiguration is applied to a corresponding SortDefinition.

sortDefinitions

SortDefinition[]

[]

An array of SortDefinition used to sort data by corresponding fields.

styleDefinitions

StyleDefinition[]

[]

An array of StyleDefinition to apply to DataGrid elements.

styleSelector

StyleSelector | null | undefined

undefined

A function used to provide custom styling to DataGrid elements.

textDefinitions

TextDefinitionCollection

{}

A collection of key/value pairs that links ids to TextDefinition.

theme

string

“light”

The theme applied on the DataGrid. See the Themes topic for more information.

validationRuleDefinitions

ValidationRuleDefinitionCollection

{}

A collection of key/value pairs that links ids to ValidationRuleDefinition.

valueConverters

ValueConverterDefinitionCollection

{}

A collection of key/value pairs that links ids to ValueConverterDefinition.

viewerDefinitions

ViewerDefinitionCollection

{}

A collection of key/value pairs that links ids to ViewerDefinition.

Remarks

A partial type/interface is an object in which properties are optional.