JavaScript/jQuery DataGrid Row
You can access grid rows using the getVisibleRows() method and within some event handlers, for example, onCellClick, onCellPrepared, onEditorPreparing.
data
The data object represented by the row.
The contents of this object depend on the value of the rowType property. The following list illustrates this dependency.
- rowType is "data" ⇒ data contains the data object of the row
- rowType is "detail" ⇒ data contains the data object of the master row in the master-detail interface
rowType is "group" ⇒ data has the following structure.
data: { key: string, // contains the grouping value items: array, // contains data objects that satisfy the grouping value isContinuation: boolean // "true" if the group starts on one of the previous pages; "false" otherwise }
rowType is "groupFooter" ⇒ data has the following structure.
data: { key: string, // contains the grouping value items: array, // contains data objects that satisfy the grouping value isContinuation: boolean, // "true" if the group starts on one of the previous pages; "false" otherwise aggregates: array // contains values calculated for the group summary }
- rowType is "header", "filter", or "totalFooter" ⇒ data is undefined
isExpanded
Indicates whether the row is expanded or collapsed. Available if rowType is "data" or "group".
key
The contents of this object depend on the value of the rowType property. The following list illustrates this dependency.
- rowType is "data" ⇒ key contains the key of the data object represented by the row
- rowType is "detail" ⇒ key contains the key of the data object represented by the master row in the master-detail interface
- rowType is "group" or "groupFooter" ⇒ key contains the grouping value
- rowType is "header", "filter", or "totalFooter" ⇒ key is undefined
rowIndex
When you have several pages in a grid, grid rows are indexed beginning with 0 on each page. Note that group rows are counted as well and, thus, have row indexes. For further information about row indexes, see the Column and Row Indexes topic.
rowType
This field can have one of the following values:
"data"
A row containing data."detail"
A row that shows detail data. It appears when a user expands a master row or edits a row in "form" editing mode. To identify whether it is one or another, check the isEditing field's value. It is true while the editing takes place."detailAdaptive"
An adaptive detail row."group"
A group row."groupFooter"
A row in a group footer that shows the group summary."header"
The row containing column headers."filter"
The filter row."totalFooter"
The row that shows the total summary.