The index of the row.
// get the index of the second selected row
let selectedRowIndex = this.grid.selectedRows[1].index;
The data passed to the row component.
// get the row data for the first selected row
let selectedRowData = this.grid.selectedRows[0].data;
Returns a value indicating whether the row component is expanded.
const row = this.grid.getRowByKey(1) as IgxTreeGridRowComponent;
const expanded = row.expanded;
Sets a value indicating whether the row component is expanded.
const row = this.grid.getRowByKey(1) as IgxTreeGridRowComponent;
row.expanded = true;
Gets the ID of the row. A row in the grid is identified either by:
let rowID = this.grid.selectedRows[2].key;
The native DOM element representing the row. Could be null in certain environments.
// get the nativeElement of the second selected row
let selectedRowNativeElement = this.grid.selectedRows[1].nativeElement;
Gets whether the row is pinned.
let isPinned = row.pinned;
Sets whether the row is pinned.
Default value is false
.
this.grid.selectedRows[0].pinned = true;
The ITreeGridRecord
passed to the row component.
const row = this.grid.getRowByKey(1) as IgxTreeGridRowComponent;
const treeRow = row.treeRow;
Sets whether this specific row has disabled functionality for editing and row selection. Default value is
false
.