Grid provides a way to present and manipulate tabular data.

Callable

  • Returns ReactNode

Accessors

groupsRecords: IgrGroupByRecord[]

Gets the hierarchical representation of the group by records.

selectedCells: IgrCellType[]

Returns an array of the selected IgxGridCells.

Events

onActiveNodeChange: (args: CustomEvent<IgrActiveNodeChangeEventArgsDetail>) => void

Type declaration

onAdvancedFilteringExpressionsTreeChange: (args: CustomEvent<IgrFilteringExpressionsTree>) => void

Type declaration

onCellClick: (args: CustomEvent<IgrGridCellEventArgsDetail>) => void

Type declaration

onCellEdit: (args: CustomEvent<IgrGridEditEventArgsDetail>) => void

Type declaration

onCellEditDone: (args: CustomEvent<IgrGridEditDoneEventArgsDetail>) => void

Type declaration

onCellEditEnter: (args: CustomEvent<IgrGridEditEventArgsDetail>) => void

Type declaration

onCellEditExit: (args: CustomEvent<IgrGridEditDoneEventArgsDetail>) => void

Type declaration

onColumnInit: (args: CustomEvent<IgrColumn>) => void

Type declaration

onColumnMoving: (args: CustomEvent<IgrColumnMovingEventArgsDetail>) => void

Type declaration

onColumnMovingEnd: (args: CustomEvent<IgrColumnMovingEndEventArgsDetail>) => void

Type declaration

onColumnMovingStart: (args: CustomEvent<IgrColumnMovingStartEventArgsDetail>) => void

Type declaration

Type declaration

onColumnPinned: (args: CustomEvent<IgrPinColumnEventArgsDetail>) => void

Type declaration

onColumnResized: (args: CustomEvent<IgrColumnResizeEventArgsDetail>) => void

Type declaration

onColumnsAutogenerated: (args: CustomEvent<IgcColumnsAutoGeneratedEventArgs>) => void

Type declaration

onColumnSelectionChanging: (args: CustomEvent<IgrColumnSelectionEventArgsDetail>) => void

Type declaration

onColumnVisibilityChanged: (args: CustomEvent<IgrColumnVisibilityChangedEventArgsDetail>) => void

Type declaration

onColumnVisibilityChanging: (args: CustomEvent<IgrColumnVisibilityChangingEventArgsDetail>) => void

Type declaration

onContextMenu: (args: CustomEvent<IgrGridContextMenuEventArgsDetail>) => void

Type declaration

onDataChanged: (args: CustomEvent<IgrForOfDataChangeEventArgsDetail>) => void

Type declaration

onDataChanging: (args: CustomEvent<IgrForOfDataChangeEventArgsDetail>) => void

Type declaration

onDataPreLoad: (args: CustomEvent<IgrForOfState>) => void

Type declaration

onDoubleClick: (args: CustomEvent<IgrGridCellEventArgsDetail>) => void

Type declaration

onExpansionStatesChange: (args: CustomEvent<Map<any, boolean>>) => void

Type declaration

onFiltering: (args: CustomEvent<IgrFilteringEventArgsDetail>) => void

Type declaration

onFilteringDone: (args: CustomEvent<IgrFilteringExpressionsTree>) => void

Type declaration

onFilteringExpressionsTreeChange: (args: CustomEvent<IgrFilteringExpressionsTree>) => void

Type declaration

onFormGroupCreated: (args: CustomEvent<IgrGridFormGroupCreatedEventArgsDetail>) => void

Type declaration

onGridCopy: (args: CustomEvent<IgrGridClipboardEvent>) => void

Type declaration

onGridKeydown: (args: CustomEvent<IgrGridKeydownEventArgsDetail>) => void

Type declaration

onGridScroll: (args: CustomEvent<IgrGridScrollEventArgsDetail>) => void

Type declaration

onGroupingDone: (args: CustomEvent<IgrGroupingDoneEventArgsDetail>) => void

Type declaration

onGroupingExpansionStateChange: (args: CustomEvent<IgrGroupByExpandState[]>) => void

Type declaration

onGroupingExpressionsChange: (args: CustomEvent<IgrGroupingExpression[]>) => void

Type declaration

onRangeSelected: (args: CustomEvent<IgrGridSelectionRange>) => void

Type declaration

onRendered: (args: CustomEvent<boolean>) => void

Type declaration

Type declaration

onRowAdded: (args: CustomEvent<IgrRowDataEventArgsDetail>) => void

Type declaration

onRowClick: (args: CustomEvent<IgrGridRowEventArgsDetail>) => void

Type declaration

onRowDelete: (args: CustomEvent<IgrRowDataCancelableEventArgsDetail>) => void

Type declaration

onRowDeleted: (args: CustomEvent<IgrRowDataEventArgsDetail>) => void

Type declaration

onRowDragEnd: (args: CustomEvent<IgrRowDragEndEventArgsDetail>) => void

Type declaration

onRowDragStart: (args: CustomEvent<IgrRowDragStartEventArgsDetail>) => void

Type declaration

onRowEdit: (args: CustomEvent<IgrGridEditEventArgsDetail>) => void

Type declaration

onRowEditDone: (args: CustomEvent<IgrGridEditDoneEventArgsDetail>) => void

Type declaration

onRowEditEnter: (args: CustomEvent<IgrGridEditEventArgsDetail>) => void

Type declaration

onRowEditExit: (args: CustomEvent<IgrGridEditDoneEventArgsDetail>) => void

Type declaration

onRowPinned: (args: CustomEvent<IgrPinRowEventArgsDetail>) => void

Type declaration

onRowPinning: (args: CustomEvent<IgrPinRowEventArgsDetail>) => void

Type declaration

onRowSelectionChanging: (args: CustomEvent<IgrRowSelectionEventArgsDetail>) => void

Type declaration

onRowToggle: (args: CustomEvent<IgrRowToggleEventArgsDetail>) => void

Type declaration

onSelected: (args: CustomEvent<IgrGridCellEventArgsDetail>) => void

Type declaration

onSelectedRowsChange: (args: CustomEvent<any[]>) => void

Type declaration

onSorting: (args: CustomEvent<IgrSortingEventArgsDetail>) => void

Type declaration

onSortingDone: (args: CustomEvent<IgrSortingExpression[]>) => void

Type declaration

onSortingExpressionsChange: (args: CustomEvent<IgrSortingExpression[]>) => void

Type declaration

onToolbarExporting: (args: CustomEvent<IgrGridToolbarExportEventArgsDetail>) => void

Type declaration

onValidationStatusChange: (args: CustomEvent<IgrGridValidationStatusEventArgsDetail>) => void

Type declaration

Methods

  • Clears grouping for particular column, array of columns or all columns.

    Clears all grouping in the grid, if no parameter is passed. If a parameter is provided, clears grouping for a particular column or an array of columns.

    this.grid.clearGrouping(); //clears all grouping
    this.grid.clearGrouping("ID"); //ungroups a single column
    this.grid.clearGrouping(["ID", "Column1", "Column2"]); //ungroups multiple columns

    Parameters

    • name: string

      Name of column or array of column names to be ungrouped.

    Returns void

  • Deselect all rows within a group.

    public groupRow: IGroupByRecord;
    this.grid.deselectRowsInGroup(this.groupRow);

    Parameters

    Returns void

  • Expands the specified group and all of its parent groups.

    public groupRow: IGroupByRecord;
    this.grid.fullyExpandGroup(this.groupRow);

    Parameters

    Returns void

  • Returns a CellType object that matches the conditions.

    const myCell = this.grid1.getCellByColumn(2, "UnitPrice");
    

    Parameters

    • rowIndex: number
    • columnField: string

    Returns IgrCellType

  • Returns a CellType object that matches the conditions.

    Requires that the primaryKey property is set.

    grid.getCellByKey(1, 'index');
    

    Parameters

    • rowSelector: any

      match any rowID

    • columnField: string

    Returns IgrCellType

  • Returns the IgxGridRow by index.

    const myRow = grid.getRowByIndex(1);
    

    Parameters

    • index: number

    Returns IgrRowType

  • Returns IgxGridRow object by the specified primary key.

    Requires that the primaryKey property is set.

    const myRow = this.grid1.getRowByKey("cell5");
    

    Parameters

    • key: any

    Returns IgrRowType

  • Returns an array of the current cell selection in the form of [{ column.field: cell.value }, ...].

    If formatters is enabled, the cell value will be formatted by its respective column formatter (if any). If headers is enabled, it will use the column header (if any) instead of the column field.

    Parameters

    • formatters: boolean
    • headers: boolean

    Returns any[]

  • Groups by a new IgxColumnComponent based on the provided expression, or modifies an existing one.

    Also allows for multiple columns to be grouped at once if an array of ISortingExpression is passed. The groupingDone event would get raised only once if this method gets called multiple times with the same arguments.

    this.grid.groupBy({ fieldName: name, dir: SortingDirection.Asc, ignoreCase: false });
    this.grid.groupBy([
    { fieldName: name1, dir: SortingDirection.Asc, ignoreCase: false },
    { fieldName: name2, dir: SortingDirection.Desc, ignoreCase: true },
    { fieldName: name3, dir: SortingDirection.Desc, ignoreCase: false }
    ]);

    Parameters

    Returns void

  • Returns if a group is expanded or not.

    public groupRow: IGroupByRecord;
    const expandedGroup = this.grid.isExpandedGroup(this.groupRow);

    Parameters

    Returns boolean

  • Pin the row by its id.

    ID is either the primaryKey value or the data record instance.

    this.grid.pinRow(rowID);
    

    Parameters

    • rowID: any

      The row id - primaryKey value or the data record instance.

    • index: number

      The index at which to insert the row in the pinned collection.

    Returns boolean

  • Select all rows within a group.

    this.grid.selectRowsInGroup(this.groupRow, true);
    

    Parameters

    Returns void

  • Toggles the expansion state of all group rows recursively.

    this.grid.toggleAllGroupRows;
    

    Returns void

  • Toggles the expansion state of a group.

    public groupRow: IGroupByRecord;
    const toggleExpGroup = this.grid.toggleGroup(this.groupRow);

    Parameters

    Returns void

  • Unpin the row by its id.

    ID is either the primaryKey value or the data record instance.

    this.grid.unpinRow(rowID);
    

    Parameters

    • rowID: any

      The row id - primaryKey value or the data record instance.

    Returns boolean

Properties

data: any[]

Gets/Sets the array of data that populates the component.

detailTemplate: IgcRenderFunction<IgrGridMasterDetailContext>

Returns a reference to the master-detail template.

let detailTemplate = this.grid.detailTemplate;
dropAreaMessage: string

Gets/Sets the message displayed inside the GroupBy drop area where columns can be dragged on.

dropAreaTemplate: IgcRenderFunction<void>

Gets/Sets the template that will be rendered as a GroupBy drop area.

groupByRowSelectorTemplate: IgcRenderFunction<IgrGroupByRowSelectorTemplateContext>

Gets the group by row selector template.

groupingExpansionState: IgrGroupByExpandState[]

Gets/Sets a list of expansion states for group rows.

groupingExpressions: IgrGroupingExpression[]

Gets/Sets the group by state.

groupRowTemplate: IgcRenderFunction<IgrGroupByRowTemplateContext>

Gets/Sets the template reference for the group row.

groupsExpanded: boolean

Gets/Sets whether created groups are rendered expanded or collapsed.

Gets/Sets the grouping strategy of the grid.

hideGroupedColumns: boolean

Gets/Sets whether the grouped columns should be hidden.

id: string

Gets/Sets the value of the id attribute.

showGroupArea: boolean

Returns whether the IgxGridComponent has group area.

totalItemCount: number

Gets/Sets the total number of records in the data source.