jQuery DataGrid Row

A grid row.

import { Row } from "devextreme/ui/data_grid"
Type:

Object

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.

Type: any

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

groupIndex

The group index of the row. Available when the rowType is "group".

Type:

Number

isEditing

Indicates whether the row is in the editing state.

Type:

Boolean

isExpanded

Indicates whether the row is expanded or collapsed. Available if rowType is "data" or "group".

Type:

Boolean

isNewRow

Indicates that the row is added, but not yet saved. Available if rowType is "data".

Type:

Boolean

See Also

isSelected

Indicates whether the row is selected. Available if rowType is "data".

Type:

Boolean

key

The key of the data object represented by the row.

Type: any

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
NOTE
If a field providing keys is not specified in the data source, the whole data object is considered the key.

rowIndex

The visible index of the row.

Type:

Number

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

The row's type.

Type:

String

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.

NOTE
Available row properties depend on the row type. For example, the data and key properties are undefined for header, filter and totalFooter rows, but have values for the other row types. Refer to a particular property's description for more information.

values

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

Type:

Array<any>