Events

This section describes events fired by this widget.

See Also

adaptiveDetailRowPreparing

Raised before an adaptive detail row is rendered.

Type:

Event

Function parameters:
e:

Object

Information about the event.

Object structure:
component:

Object

element:

Element (jQuery or HTML)

The widget's container.

model:

Object

The model data. Available only if you use Knockout.

formOptions:

Object

The options of the Form widget.

Main article: onAdaptiveDetailRowPreparing

See Also

cellClick

Fires when a user clicks a grid cell.

Type:

Event

Function parameters:
e:

Object

Information about the event.

Object structure:
component:

Object

The widget instance.

element:

Element (jQuery or HTML)

The widget's container.

model:

Object

Data that is available for binding against the element. Available only in the Knockout approach.

jQueryEvent:

jQuery.Event

The jQuery event that caused the handler execution. Deprecated in favor of the event field.

event:

Event (jQuery or dxEvent)

The event that caused the handler execution. It is a dxEvent or a jQuery.Event when you use jQuery.

data:

Object

The object of the data source represented by the row to which the clicked cell belongs.

key: any

The key of the row. If a field providing keys is not specified in a data source, the whole data object is considered the key.

value: any

The value of the clicked cell as it is specified in a data source.

displayValue:

String

The value displayed by the clicked cell. Differs from the value field only when the column to which the clicked cell belongs uses lookup.

text:

String

The value of the clicked cell in a string format. Use this field to get the value with applied format.

columnIndex:

Number

The current index of the column to which the clicked cell belongs. For more information on how this index is calculated, refer to the Column and Row Indexes topic.

column:

Object

The settings of the column to which the clicked cell belongs.

rowIndex:

Number

The index of the row to which the clicked cell belongs. When you have several pages in a grid, grid rows are indexed beginning with 0 on each page. Note that group cells are also counted as rows and, thus, have row indexes. For further information about row indexes, see the Column and Row Indexes topic.

rowType:

String

The type of the row to which the clicked cell belongs. This field equals 'data' for data rows or 'group' for group rows. Use this field to distinguish rows by type.

cellElement:

Element (jQuery or HTML)

The element of the clicked cell.

The settings of the row to which the clicked cell belongs.

Instead, you can use the onCellClick option to handle the event.

When implementing a handling function for this event, use the object passed to this function as its parameter. Among the fields of this object, you can find data relating to the clicked cell.

In addition, you can perform some actions when a user clicks a row. For this purpose, handle the rowClick event.

NOTE
cellClick fires before rowClick.
See Also

cellHoverChanged

Fires when the hover state of a cell is changed.

Type:

Event

Function parameters:
e:

Object

Information about the event.

Object structure:
component:

Object

The widget instance.

element:

Element (jQuery or HTML)

The widget's container.

model:

Object

Data that is available for binding against the element. Available only in the Knockout approach.

eventType:

String

Identifies whether the cell has been hovered over or hovered out. This field equals either "mouseover" or "mouseout".

data:

Object

The object of the data source presented by the row to which the current cell belongs.

key: any

The key of the row. If a field providing keys is not specified in a data source, the whole data object is considered the key.

value: any

The value of the current cell as it is specified in the data source.

text:

String

The value of the current cell in a string format. Use this field to get the value with an applied format.

displayValue:

String

The value displayed by the current cell. Differs from the value field only when the column to which the current cell belongs uses lookup.

columnIndex:

Number

The index of the column to which the current cell belongs. For more information on how this index is calculated, refer to the Column and Row Indexes topic.

rowIndex:

Number

The index of the row to which the current cell belongs. When you have several pages in a grid, grid rows are indexed beginning with 0 on each page. Note that group cells are also counted as rows and, thus, have row indexes. For further information about row indexes, see the Column and Row Indexes topic.

The settings of the column to which the current cell belongs.

rowType:

String

The type of the row to which the current cell belongs. This field equals 'data' for data rows or 'group' for group rows. Use this field to distinguish rows by type.

cellElement:

Element (jQuery or HTML)

The element of the hovered cell.

The settings of the row to which the cell belongs.

Instead, you can use the onCellHoverChanged option to handle the event.

When implementing a handling function for this event, use the object passed to this function as its parameter. Among the fields of this object, you can find data relating to the cell whose hover state has been changed. For example, to identify whether a cell has been hovered over or hovered out, check the value of the eventType field.

See Also

cellPrepared

Fires after a cell has been rendered.

Type:

Event

Function parameters:
e:

Object

Information about the event.

Object structure:
component:

Object

The widget instance.

element:

Element (jQuery or HTML)

The widget's container.

model:

Object

Data that is available for binding against the element. Available only in the Knockout approach.

data:

Object

The object of a data source represented by the row to which the prepared cell belongs.

key: any

The key of the row. If a field providing keys is not specified in a data source, the whole data object is considered the key.

value: any

The value of the prepared cell as it is specified in the data source.

displayValue:

String

The value displayed by the prepared cell. Differs from the value field only when the column to which the prepared cell belongs uses lookup.

text:

String

The value of the prepared cell in a string format. Use this field to get the value with applied format.

columnIndex:

Number

The index of the column to which the prepared cell belongs. For more information on how this index is calculated, refer to the Column and Row Indexes topic.

The settings of the column to which the prepared cell belongs.

rowIndex:

Number

The index of the row to which the prepared cell belongs. When you have several pages in a grid, grid rows are indexed beginning with 0 on each page. Note that group cells are also counted as rows and thus have row indexes. For further information about row indexes, see the Column and Row Indexes topic.

rowType:

String

The type of the row to which the prepared cell belongs. This field can be set to one of the following values: "data", "detail", "group", "groupFooter", "header", "filter" or "totalFooter". Use this field to distinguish rows by type.

The settings of the row to which the cell belongs.

isSelected:

Boolean

Indicates whether or not the current row is selected.

isExpanded:

Boolean

Indicates whether or not the group cell is expanded. This field is useful if the rowType field is 'group'.

cellElement:

Element (jQuery or HTML)

The element of the prepared cell.

Instead, you can use the onCellPrepared option to handle the event.

When implementing a handling function for this event, use the object passed to this function as its parameter. Among the fields of this object, you can find data relating to the prepared cell.

See Also

contentReady

Raised when the widget's content is ready.

Type:

Event

Function parameters:
e:

Object

Information about the event.

Object structure:
component:

Object

The widget instance.

element:

Element (jQuery or HTML)

The widget's container.

model:

Object

Data that is available for binding against the element. Available only in the Knockout approach.

Main article: onContentReady.

See Also

contextMenuPreparing

Fires before displaying a context menu that is invoked on one of the grid's header or row cells.

Type:

Event

Function parameters:
e:

Object

Information about the event.

Object structure:
component:

Object

The widget instance.

element:

Element (jQuery or HTML)

The widget's container.

model:

Object

Data that is available for binding against the element. Available only in the Knockout approach.

items:

Array<Object>

An array of items to be displayed by the context menu. The item objects must have the fields that are used by the ContextMenu default item template.

target:

String

The name of the grid element on which the context menu is invoked: 'header', 'content' or 'footer'.

targetElement:

Element (jQuery or HTML)

The cell that has been clicked to invoke the context menu.

columnIndex:

Number

The current index of the column to which the clicked cell belongs. For more information on how this index is calculated, refer to the Column and Row Indexes topic.

The settings of the column to which the clicked cell belongs.

rowIndex:

Number

The visible index of the row to which the clicked cell belongs. When you have several pages in a grid, grid rows are indexed beginning with 0 on each page. Note that group cells are also counted as rows and, thus, have row indexes. For further information about row indexes, see the Column and Row Indexes topic.

The settings of the row to which the clicked cell belongs.

Instead, you can use the onContextMenuPreparing option to handle the event.

Handle this event to change the set of items in a context menu before it is displayed.

See Also

dataErrorOccurred

Raised when an error occurs in the data source.

Type:

Event

Function parameters:
e:

Object

Information on the occurred error.

Object structure:
component:

Object

element:

Element (jQuery or HTML)

The widget's container.

model:

Object

The model data. Available only if you use Knockout.

error: Error

The standard Error object that defines the error.

Main article: onDataErrorOccurred

See Also

disposing

Raised when the widget is removed from the DOM using the remove(), empty(), or html() jQuery methods only.

Type:

Event

Function parameters:
e:

Object

Information about the event.

Object structure:
component:

Object

The widget instance.

element:

Element (jQuery or HTML)

The widget's container.

model:

Object

The model data. Available only if you use Knockout.

See Also

editingStart

Fires before a row (in row edit mode) or a cell (in batch edit mode) switches into the editing state.

Type:

Event

Function parameters:
e:

Object

Information about the event.

Object structure:
component:

Object

The widget instance.

element:

Element (jQuery or HTML)

The widget's container.

model:

Object

Data that is available for binding against the element. Available only in the Knockout approach.

data:

Object

The data object of the row.

key: any

The key of the row. If a field providing keys is not specified in a data source, the whole data object is considered the key. If a row has not been transmitted to the data source yet, its key is undefined.

cancel:

Boolean

A flag allowing you to prevent the row from switching into the editing state.

column:

Object

The options of the column whose cell is switching into the editing state; useful in the batch edit mode.

Instead, you can use the onEditingStart option to handle the event.

When implementing a handling function for this event, use the object passed to this function as its argument. Among the fields of this object, you can find parameters of the about-to-be-edited row.

If you need to prevent a specific row or cell from switching into the editing state, assign true to the cancel field of the object passed to the handler as the argument.

You can also distinguish rows that exist in the data source from rows that have not yet been transmitted to the data source. For this purpose, use the key field of the object with the row parameters. Not-yet-transmitted rows have this field undefined.

See Also

editorPrepared

Fires after an editor is created.

Type:

Event

Function parameters:
options:

Object

Information about the event.

Object structure:
component:

Object

The widget instance.

element:

Element (jQuery or HTML)

The widget's container.

model:

Object

The model data. Available only if you use Knockout.

parentType:

String

The editor's location. One of 'dataRow', 'filterRow', 'headerRow' or 'searchPanel'.
Options passed to the handler depend on this value.

value: any

The editor's value.

setValue(newValue): any

A method that you need to call to change the cell value after the editor's value is changed.

updateValueTimeout:

Number

Gets and sets the delay between the moment a user stops typing a filter value and the moment it is applied. Available if parentType is 'filterRow' or 'searchPanel'.

width:

Number

The editor's width; equals null for editors of all parent types except for the 'searchPanel'.

disabled:

Boolean

Indicates whether the editor is disabled.

rtlEnabled:

Boolean

Indicates whether the editor uses a right-to-left representation.

editorElement:

Element (jQuery or HTML)

The editor's container.

readOnly:

Boolean

Indicates whether the editor is read-only.

dataField:

String

The name of the field that provides data for the column to which the editor belongs.

The properties of the row to which the editor belongs.

Instead, you can use the onEditorPrepared option to handle the event.

Many grid elements are constructed on editors. For example, the search panel is constructed on a text box, the selection column is built on check boxes in full, etc. Obviously, editors are also used to edit cells or rows in a grid. When default editors provided by DataGrid do not meet your requirements, you can customize them by changing their settings within the editorPrepared event handler. This handler will be called after an editor is created.

When implementing the handler, use the object passed to it as its argument. Among the fields of this object, you can find the options of the created editor. These options differ depending on the parent element of the editor. To identify the parent element, check the parentType field of the handler's argument.

When the parentType is 'dataRow' or 'headerRow', you can use the options described in the column's reference section.

NOTE
If you have specified the editCellTemplate option, the editorPrepared event will not fire when a row or a cell switches into the editing state.
See Also

editorPreparing

Fires before an editor is created.

Type:

Event

Function parameters:
e:

Object

Information about the event.

Object structure:
component:

Object

The widget instance.

element:

Element (jQuery or HTML)

The widget's container.

model:

Object

The model data. Available only if you use Knockout.

parentType:

String

The editor's location. One of 'dataRow', 'filterRow', 'headerRow' or 'searchPanel'.
Options passed to the handler depend on this value.

value: any

The editor's value.

setValue(newValue): any

A method that you should call to change the cell value after the editor's value is changed.

updateValueTimeout:

Number

Gets and sets the delay between the moment a user stops typing a filter value and the moment it is applied. Available if parentType is 'filterRow' or 'searchPanel'.

width:

Number

The editor's width; equals null for editors of all parent types except for the 'searchPanel'.

disabled:

Boolean

Indicates whether the editor is disabled.

rtlEnabled:

Boolean

Indicates whether the editor uses a right-to-left representation.

cancel:

Boolean

Allows you to cancel the creation of the editor.
Set it to true and implement a custom editor if your scenario requires it.

editorElement:

Element (jQuery or HTML)

The editor's container.

readOnly:

Boolean

Indicates whether the editor is read-only.

editorName:

String

Allows you to change the editor. Accepts names of DevExtreme widgets only, for example, "dxTextBox".

editorOptions:

Object

Gets and sets the editor configuration.

dataField:

String

The name of the field that provides data for the column to which the editor belongs.

The properties of the row to which the editor belongs.

Instead, you can use the onEditorPreparing option to handle the event.

Many grid elements are constructed on editors. For example, the search panel is constructed on a text box, the selection column is built on check boxes in full, etc. Obviously, editors are also used to edit a cell or a row in a grid. When default editors provided by DataGrid do not meet your requirements, implement a custom editor. For this purpose, attach a handling function to the editorPreparing event. This function accepts an object as the parameter. Assign true to the cancel field of this object. After that, implement your editor using the other fields of this object.

You can distinguish editors by their parent element. Also, the parent element defines data passed to the editorPreparing handler. To identify the parent element, check the parentType field of the handler's argument.

When the parentType is 'dataRow' or 'headerRow', you can use the options described in the columns reference section.

NOTE
If you have specified the editCellTemplate option, the editorPrepared event will not fire when a row or a cell switches into the editing state.
See Also

exported

Fires after the exporting of grid data is completed.

Type:

Event

Function parameters:
e:

Object

Information about the event.

Object structure:
component:

Object

The widget instance.

element:

Element (jQuery or HTML)

The widget's container.

model:

Object

Data that is available for binding against the element. Available only in the Knockout approach.

Instead, you can use the onExported option to handle the event.

See Also

exporting

Fires before exporting grid's data.

Type:

Event

Function parameters:
e:

Object

Information about the event.

Object structure:
component:

Object

The widget instance.

element:

Element (jQuery or HTML)

The widget's container.

model:

Object

Data that is available for binding against the element. Available only in the Knockout approach.

fileName:

String

The name of the file to which grid data is about to be exported.

cancel:

Boolean

Indicates whether or not to cancel exporting.

Instead, you can use the onExporting option to handle the event.

See Also

fileSaving

Fires before the grid saves an Excel file with exported data on the user's local storage.

Type:

Event

Function parameters:
e:

Object

Information about the event.

Object structure:
component:

Object

The widget instance.

element:

Element (jQuery or HTML)

The widget's container.

fileName:

String

The name of the file to be saved.

format:

String

The format of the file to be saved. Equals 'EXCEL' for an Excel file.

data:

BLOB

Exported data as a BLOB.

cancel:

Boolean

To cancel file saving, assign true to this parameter.

Instead, you can use the onFileSaving option to handle the event.

See Also

initialized

Raised only once, after the widget is initialized.

Type:

Event

Function parameters:
e:

Object

Information about the event.

Object structure:
component:

Object

The widget's instance.

element:

Element (jQuery or HTML)

The widget's container.

Main article: onInitialized

See Also

initNewRow

Raised before a new row is added to the widget.

Type:

Event

Function parameters:
e:

Object

Information about the event.

Object structure:
component:

Object

element:

Element (jQuery or HTML)

The widget's container.

model:

Object

The model data. Available only if you use Knockout.

data:

Object

The data of the inserted row; initially empty.

Main article: onInitNewRow

See Also

keyDown

Raised when the widget is in focus and a key has been pressed down.

Type:

Event

Function parameters:
e:

Object

Information about the event.

Object structure:
component:

Object

element:

Element (jQuery or HTML)

The widget's container.

jQueryEvent:

jQuery.Event

The jQuery event that caused the handler execution. Deprecated in favor of the event field.

event:

Event (jQuery or dxEvent)

The event that caused the handler execution. It is a dxEvent or a jQuery.Event when you use jQuery.

handled:

Boolean

Indicates whether the widget has already handled this event.

Main article: onKeyDown

See Also

optionChanged

Raised after a widget option is changed.

Type:

Event

Function parameters:
e:

Object

Information about the event.

Object structure:
component:

Object

name:

String

The option's short name.

fullName:

String

The option's full name.

value: any

The option's new value.

element:

Element (jQuery or HTML)

The widget's container.

model:

Object

The model data. Available only if you use Knockout.

See Also

rowClick

Fires when a user clicks a grid row.

Type:

Event

Function parameters:
e:

Object

Information about the event.

Object structure:
component:

Object

The widget instance.

element:

Element (jQuery or HTML)

The widget's container.

model:

Object

Data that is available for binding against the element. Available only in the Knockout approach.

jQueryEvent:

jQuery.Event

The jQuery event that caused the handler execution. Deprecated in favor of the event field.

event:

Event (jQuery or dxEvent)

The event that caused the handler execution. It is a dxEvent or a jQuery.Event when you use jQuery.

data:

Object

The object of the data source represented by the clicked row.

key: any

The key value of the clicked row.

values:

Array<Object>

Values of the clicked row as they exist in the data source.

columns:

Array<Object>

Grid columns. Each column in this array is represented by an object with column settings. The order of columns in this array and columns in the columns array coincides.

rowIndex:

Number

The visible index of the clicked row. When you have several pages in a grid, grid rows are indexed beginning with 0 on each page. Note that group rows are also counted and, thus, have row indexes. For further information about row indexes, see the Column and Row Indexes topic.

rowType:

String

The type of the clicked row. This field equals 'data' for data rows, 'group' for group rows or 'detail' for detail sections. Use this field to distinguish rows by type.

isSelected:

Boolean

Indicates whether the clicked row is selected.

isExpanded:

Boolean

Indicates whether or not the group row is expanded. This field is useful if the rowType field is 'group'.

groupIndex:

Number

The group index of the clicked row. This field is useful if the rowType field is 'group'.

rowElement:

Element (jQuery or HTML)

The clicked row; provides access to element-related jQuery operations.

handled:

Boolean

Indicates if the grid has already handled the row click event.

Instead, you can use the onRowClick option to handle the event.

When implementing a handling function for this event, use the object passed to this function as its parameter. Among the fields of this object, you can find data relating to the clicked row.

NOTE
If there are any internal grid handlers for the row click, the rowClick event fires only after these handlers are executed. In this case, the handled field of the handler parameter is set to true.

In addition, you can perform certain actions when a user clicks a cell. For this purpose, handle the cellClick event. Note that the cellClick fires before the rowClick.

NOTE
When the clicked row is in the editing state, or switches to the editing state, the rowClick event will not fire. Instead, you can use the cellClick.
See Also

rowCollapsed

Raised after a row is collapsed.

Type:

Event

Function parameters:
e:

Object

Information about the event.

Object structure:
component:

Object

element:

Element (jQuery or HTML)

The widget's container.

model:

Object

The model data. Available only if you use Knockout.

key: any

The key of the row.

Main article: onRowCollapsed

See Also

rowCollapsing

Raised before a row is collapsed.

Type:

Event

Function parameters:
e:

Object

Information about the event.

Object structure:
component:

Object

element:

Element (jQuery or HTML)

The widget's container.

model:

Object

The model data. Available only if you use Knockout.

key: any

The key of the row.

cancel:

Boolean

Allows you to cancel row collapsing.

Main article: onRowCollapsing

See Also

rowExpanded

Raised after a row is expanded.

Type:

Event

Function parameters:
e:

Object

Information about the event.

Object structure:
component:

Object

element:

Element (jQuery or HTML)

The widget's container.

model:

Object

The model data. Available only if you use Knockout.

key: any

The key of the row.

Main article: onRowExpanded

See Also

rowExpanding

Raised before a row is expanded.

Type:

Event

Function parameters:
e:

Object

Information about the event.

Object structure:
component:

Object

element:

Element (jQuery or HTML)

The widget's container.

model:

Object

The model data. Available only if you use Knockout.

key: any

The key of the group or master row.

cancel:

Boolean

Allows you to cancel row expansion.

Main article: onRowExpanding

See Also

rowInserted

Raised after a new row has been inserted into the data source.

Type:

Event

Function parameters:
e:

Object

Information about the event.

Object structure:
component:

Object

element:

Element (jQuery or HTML)

The widget's container.

model:

Object

The model data. Available only if you use Knockout.

data:

Object

The data of the row.

key: any

The key of the row. If a field providing keys is not specified in the data source, the whole data object is considered the key.

error: Error

The standard Error object defining an error that may occur during insertion.

Main article: onRowInserted

See Also

rowInserting

Raised before a new row is inserted into the data source.

Type:

Event

Function parameters:
e:

Object

Information about the event.

Object structure:
component:

Object

element:

Element (jQuery or HTML)

The widget's container.

model:

Object

The model data. Available only if you use Knockout.

data:

Object

The data of the to-be-inserted row.

cancel:

Boolean

|

Promise (jQuery or native)

Allows you to cancel row insertion.

Main article: onRowInserting

See Also

rowPrepared

Fires after a row has been rendered.

Type:

Event

Function parameters:
e:

Object

Information about the event.

Object structure:
component:

Object

The widget instance.

element:

Element (jQuery or HTML)

The widget's container.

model:

Object

Data that is available for binding against the element. Available only in the Knockout approach.

data:

Object

The object of a data source represented by the prepared row.

key: any

The key of the row. If a field providing keys is not specified in a data source, the whole data object is considered the key.

values:

Array<Object>

Values of the current row as they exist in the data source.

Grid columns. Each column in this array is represented by an object with column settings. The order of columns in this array and columns in the columns array coincides.

rowIndex:

Number

The visible index of the prepared row. When you have several pages in a grid, grid rows are indexed beginning with 0 on each page. Note that group cells are also counted as rows and, thus, have row indexes. For further information about row indexes, see the Column and Row Indexes topic.

rowType:

String

The type of the prepared row. This field can be set to one of the following values: "data", "detail", "group", "groupFooter", "header", "filter" or "totalFooter". Use this field to distinguish rows by type.

groupIndex:

Number

The group index of the current row. This field is useful if the rowType field is 'group'.

isSelected:

Boolean

Indicates whether the prepared row is selected.

isExpanded:

Boolean

Indicates whether the prepared row is expanded.

rowElement:

Element (jQuery or HTML)

The element of the hovered row.

Instead, you can use the onRowPrepared option to handle the event.

When implementing a handling function for this event, use the object passed to this function as its parameter. Among the fields of this object, you can find data relating to the prepared row.

See Also

rowRemoved

Raised after a row has been removed from the data source.

Type:

Event

Function parameters:
e:

Object

Information about the event.

Object structure:
component:

Object

element:

Element (jQuery or HTML)

The widget's container.

model:

Object

The model data. Available only if you use Knockout.

data:

Object

The data of the row.

key: any

The key of the row. If a field providing keys is not specified in the data source, the whole data object is considered the key.

error: Error

The standard Error object defining an error that may occur during removal.

Main article: onRowRemoved

See Also

rowRemoving

Raised before a row is removed from the data source.

Type:

Event

Function parameters:
e:

Object

Information about the event.

Object structure:
component:

Object

element:

Element (jQuery or HTML)

The widget's container.

model:

Object

The model data. Available only if you use Knockout.

data:

Object

The data of the row.

key: any

The key of the row. If a field providing keys is not specified in the data source, the whole data object is considered the key.

cancel:

Boolean

|

Promise (jQuery or native)

Allows you to cancel row removal.

Main article: onRowRemoving

See Also

rowUpdated

Raised after a row has been updated in the data source.

Type:

Event

Function parameters:
e:

Object

Information about the event.

Object structure:
component:

Object

element:

Element (jQuery or HTML)

The widget's container.

model:

Object

The model data. Available only if you use Knockout.

data:

Object

The updated data of the row; contains only those fields that have been updated.

key: any

The key of the row. If a field providing keys is not specified in the data source, the whole data object is considered the key.

error: Error

The standard Error object defining an error that may occur during updating.

Main article: onRowUpdated

See Also

rowUpdating

Raised before a row is updated in the data source.

Type:

Event

Function parameters:
e:

Object

Information about the event.

Object structure:
component:

Object

element:

Element (jQuery or HTML)

The widget's container.

model:

Object

The model data. Available only if you use Knockout.

oldData:

Object

The old data of the row.

newData:

Object

The updated data of the row.

key: any

The key of the row. If a field providing keys is not specified in the data source, the whole data object is considered the key.

cancel:

Boolean

|

Promise (jQuery or native)

Allows you to cancel row updating.

Main article: onRowUpdating

See Also

rowValidating

Raised after cells in a row are validated against validation rules.

Type:

Event

Function parameters:
e:

Object

Information about the event.

Object structure:
component:

Object

element:

Element (jQuery or HTML)

The widget's container.

model:

Object

The model data. Available only if you use Knockout.

brokenRules:

Array<Object>

An array of broken rules. The structure of rule objects is described in the Validation Rules section.

isValid:

Boolean

Indicates whether data in all cells of the row satisfies the validation rules.

key: any

The key of the row. If a field providing keys is not specified in the data source, the whole data object is considered the key.

newData:

Object

The data of the validated row after changes.

oldData:

Object

The data of the validated row before changes.

errorText:

String

An error message to be displayed.

Main article: onRowValidating

See Also

selectionChanged

Raised after selecting a row or clearing its selection.

Type:

Event

Function parameters:
e:

Object

Information about the event.

Object structure:
component:

Object

element:

Element (jQuery or HTML)

The widget's container.

model:

Object

The model data. Available only if you use Knockout.

currentSelectedRowKeys:

Array<any>

The keys of the rows that have been selected.

currentDeselectedRowKeys:

Array<any>

The keys of the rows whose selection has been cleared.

selectedRowKeys:

Array<any>

The keys of all selected rows.

selectedRowsData:

Array<Object>

The data of all selected rows.
Does not include calculated values.

Main article: onSelectionChanged

See Also

toolbarPreparing

Raised before the toolbar is created.

Type:

Event

Function parameters:
e:

Object

Information about the event.

Object structure:
component:

Object

element:

Element (jQuery or HTML)

The widget's container.

model:

Object

The model data. Available only if you use Knockout.

toolbarOptions: dxToolbarOptions

Main article: onToolbarPreparing

See Also