Class IgxRowComponent<T>

Type parameters

Hierarchy

Implements

  • DoCheck

Constructors

constructor

  • new IgxRowComponent(gridAPI: GridBaseAPIService<T>, selection: IgxSelectionAPIService, element: ElementRef, cdr: ChangeDetectorRef): IgxRowComponent

Properties

cdr

cdr: ChangeDetectorRef

cells

cells: QueryList<IgxGridCellComponent>

The rendered cells in the row component.

// get the cells of the third selected row
let selectedRowCells = this.grid.selectedRows[2].cells;

element

element: ElementRef

gridAPI

gridAPI: GridBaseAPIService<T>

index

index: number

The index of the row.

// get the index of the second selected row
let selectedRowIndex = this.grid.selectedRows[1].index;

Accessors

dataRowIndex

  • get dataRowIndex(): number

grid

  • get grid(): T
  • Get a reference to the grid that contains the selected row.

    handleRowSelection(event) {
     // the grid on which the onRowSelectionChange event was triggered
     const grid = event.row.grid;
    }
     <igx-grid
       [data]="data"
       (onRowSelectionChange)="handleRowSelection($event)">
     </igx-grid>

    Returns T

inEditMode

  • get inEditMode(): boolean

nativeElement

  • get nativeElement(): any
  • 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;

    Returns any

rowData

  • get rowData(): any
  • set rowData(v: any): void
  • The data passed to the row component.

    // get the row data for the first selected row
    let selectedRowData = this.grid.selectedRows[0].rowData;

    Returns any

  • The data passed to the row component.

    // get the row data for the first selected row
    let selectedRowData = this.grid.selectedRows[0].rowData;

    Parameters

    • v: any

    Returns void

Methods

delete

  • delete(): void
  • Removes the specified row from the grid's data source. This method emits onRowDeleted event.

    // delete the third selected row from the grid
    this.grid.selectedRows[2].delete();

    Returns void

update

  • update(value: any): void
  • Updates the specified row object and the data source record with the passed value. This method emits onEditDone event.

    // update the second selected row's value
    let newValue = "Apple";
    this.grid.selectedRows[1].update(newValue);

    Parameters

    • value: any

    Returns void