Row Properties
The wijmo.grid.Row class has almost 20 properties which you can use to configure rows's appearance and behavior.
Note that when grids refresh, the scrollable rows are re-created (so they can be bound to the new data). Because of this, you should normally apply row properties in response to the loadedRows event, which fires after the rows have been created.
Most rows are instances of the Row class, but grouped grids may also contain GroupRow objects, which extend the regular Row class.
The most important properties in the Row class are:
- dataItem: Contains a reference to the data item that is bound to the row. This property is set by the grid when it creates bound rows, and is often used in formatItem event handlers. In GroupRow objects, the dataItem property contains a reference to the row's Group rather than to a regular data item.
- isReadOnly: Gets or sets whether the row is editable. By default, Row instances are editable and GroupRow instances are not.
- isSelected: This property is important when the grid's selectionMode property is set to ListBox. In this case, users may select non-contiguous sets of rows, and the isSelected property allows you to get or set the selected state of individual rows.
- visible: Gets or sets whether the row is visible. You can use this property to conditionally hide rows.
- isVisible: Gets a value that indicates whether the row is currently visible. Even if the visible property is set to true, rows may be hidden because they are part of collapsed groups.
For example, click the button below to hide or show every alternate row on the grid.