行のインデックス。
//2 番目に選択された項目のインデックスを取得します。
let selectedRowIndex = this.grid.selectedRows[1].index;
行が展開されるかどうかを指定する値を返します。
const row = this.grid.getRowByKey(1) as IgxTreeGridRowComponent;
const expanded = row.expanded;
行コンポーネントが展開されたどうかを示す値を設定します。
const row = this.grid.getRowByKey(1) as IgxTreeGridRowComponent;
row.expanded = true;
選択した行を含むグリッドへの参照を取得します。
handleRowSelection(event) {
// onRowSelectionChange イベントがトリガーするグリッド。
const grid = event.row.grid;
}
<igx-grid
[data]="data"
(onRowSelectionChange)="handleRowSelection($event)">
</igx-grid>
行を表すネイティブ DOM 要素。特定の環境で null 値か可能です。
// 選択された 2 番目の nativeElement を取得します。
let selectedRowNativeElement = this.grid.selectedRows[1].nativeElement;
行コンポーネントに渡されるデータ。
// 最初に選択された行のデータを取得します。
let selectedRowData = this.grid.selectedRows[0].rowData;
行コンポーネントに渡されるデータ。
// 最初に選択された行のデータを取得します。
let selectedRowData = this.grid.selectedRows[0].rowData;
行コンポーネントに渡されるITreeGridRecord
。
const row = this.grid.getRowByKey(1) as IgxTreeGridRowComponent;
const treeRow = row.treeRow;
行コンポーネントに渡されるITreeGridRecord
。
const row = this.grid.getRowByKey(1) as IgxTreeGridRowComponent;
const treeRow = row.treeRow;
グリッドのデータソースから指定した行を削除します。
このメソッドは onRowDeleted
イベントを発生します。
// グリッドで 3 番目に選択された行を削除します。
this.grid.selectedRows[2].delete();
指定した行オブジェクトおよびデータ ソース レコードを渡された値で更新します。
このメソッドは onEditDone
イベントを発生します。
// 2 番目に選択された行の値を更新します。
let newValue = "Apple";
this.grid.selectedRows[1].update(newValue);
行コンポーネントの描画されるセル。
const row = this.grid.getRowByKey(1); const cells = row.cells;