Hierarchy

Hierarchy

Constructors

Properties

Accessors

Methods

Constructors

Properties

context: any

If using the new style context, re-declare this in your class to be the React.ContextType of your static contextType. Should be used with type annotation or static contextType.

static contextType = MyContext
// For TS pre-3.7:
context!: React.ContextType<typeof MyContext>
// For TS 3.7 and above:
declare context: React.ContextType<typeof MyContext>
props: Readonly<IIgrGridProps> & Readonly<{
    children?: ReactNode;
}>
refs: {
    [key: string]: ReactInstance;
}

Type declaration

  • [key: string]: ReactInstance
state: Readonly<{}>
contextType?: Context<any>

If set, this.context will be set at runtime to the current value of the given Context.

Usage:

type MyContext = number
const Ctx = React.createContext<MyContext>(0)

class Foo extends React.Component {
static contextType = Ctx
context!: React.ContextType<typeof Ctx>
render () {
return <>My context's value: {this.context}</>;
}
}

Accessors

  • get actualActionStripComponents(): IgrActionStrip[]
  • Returns IgrActionStrip[]

  • get actualColumns(): IgrColumnCollection
  • Returns IgrColumnCollection

  • set actualColumns(v): void
  • Parameters

    Returns void

  • get actualPaginationComponents(): IgrPaginator[]
  • Returns IgrPaginator[]

  • get actualToolbar(): IgrGridToolbar[]
  • Returns IgrGridToolbar[]

  • get addRowEmptyTemplate(): FunctionComponent<{
        dataContext: any;
    }> | Component<{
        dataContext: any;
    }, {}, any>
  • Returns FunctionComponent<{
        dataContext: any;
    }> | Component<{
        dataContext: any;
    }, {}, any>

  • set addRowEmptyTemplate(v): void
  • Parameters

    • v: FunctionComponent<{
          dataContext: any;
      }> | Component<{
          dataContext: any;
      }, {}, any>

    Returns void

  • get advancedFilteringExpressionsTree(): IgrFilteringExpressionsTree
  • Gets/Sets the advanced filtering state.

    Example

    let advancedFilteringExpressionsTree = this.grid.advancedFilteringExpressionsTree;
    this.grid.advancedFilteringExpressionsTree = logic;

    Returns IgrFilteringExpressionsTree

  • set advancedFilteringExpressionsTree(v): void
  • Parameters

    Returns void

  • get allowAdvancedFiltering(): boolean
  • Returns boolean

  • set allowAdvancedFiltering(v): void
  • Parameters

    • v: boolean

    Returns void

  • get allowFiltering(): boolean
  • Returns boolean

  • set allowFiltering(v): void
  • Parameters

    • v: boolean

    Returns void

  • get autoGenerate(): boolean
  • Returns boolean

  • set autoGenerate(v): void
  • Parameters

    • v: boolean

    Returns void

  • get autoGenerateExclude(): string[]
  • Returns string[]

  • set autoGenerateExclude(v): void
  • Parameters

    • v: string[]

    Returns void

  • get batchEditing(): boolean
  • Returns boolean

  • set batchEditing(v): void
  • Parameters

    • v: boolean

    Returns void

  • get cellSelection(): GridSelectionMode
  • Gets/Sets cell selection mode.

    Remarks

    By default the cell selection mode is multiple selectionMode: GridSelectionMode

    Returns GridSelectionMode

  • set cellSelection(v): void
  • Parameters

    Returns void

  • get clipboardOptions(): IgrClipboardOptions
  • Controls the copy behavior of the grid.

    Returns IgrClipboardOptions

  • set clipboardOptions(v): void
  • Parameters

    Returns void

  • get columnPin(): ((s, e) => void)
  • Emitted before IgxColumnComponent is pinned.

    Remarks

    The index at which to insert the column may be changed through the insertAtIndex property.

    Example

    public columnPinning(event) {
    if (event.column.field === "Name") {
    event.insertAtIndex = 0;
    }
    }

    Returns ((s, e) => void)

  • set columnPin(ev): void
  • Parameters

    Returns void

  • get columnPinned(): ((s, e) => void)
  • Emitted after IgxColumnComponent is pinned.

    Remarks

    The index that the column is inserted at may be changed through the insertAtIndex property.

    Example

    public columnPinning(event) {
    if (event.column.field === "Name") {
    event.insertAtIndex = 0;
    }
    }

    Returns ((s, e) => void)

      • (s, e): void
      • Emitted after IgxColumnComponent is pinned.

        Remarks

        The index that the column is inserted at may be changed through the insertAtIndex property.

        Example

        public columnPinning(event) {
        if (event.column.field === "Name") {
        event.insertAtIndex = 0;
        }
        }

        Parameters

        Returns void

  • set columnPinned(ev): void
  • Parameters

    Returns void

  • get columnSelection(): GridSelectionMode
  • Gets/Sets column selection mode

    Remarks

    By default the row selection mode is none selectionMode: GridSelectionMode

    Returns GridSelectionMode

  • set columnSelection(v): void
  • Parameters

    Returns void

  • get columnWidth(): string
  • Returns string

  • set columnWidth(v): void
  • Parameters

    • v: string

    Returns void

  • get columns(): IgrColumnCollection
  • Gets an array of IgxColumnComponents.

    Example

    const colums = this.grid.columns.
    

    Returns IgrColumnCollection

  • get contentActionStripComponents(): IgrActionStrip[]
  • Returns IgrActionStrip[]

  • get contentPaginationComponents(): IgrPaginator[]
  • Returns IgrPaginator[]

  • get contentToolbar(): IgrGridToolbar[]
  • Returns IgrGridToolbar[]

  • get data(): any[]
  • Returns any[]

  • set data(v): void
  • Parameters

    • v: any[]

    Returns void

  • get dataChanged(): ((s, e) => void)
  • Returns ((s, e) => void)

  • set dataChanged(ev): void
  • Parameters

    Returns void

  • get dataCloneStrategy(): IgrDataCloneStrategy
  • Returns IgrDataCloneStrategy

  • set dataCloneStrategy(v): void
  • Parameters

    Returns void

  • get dataPreLoad(): ((s, e) => void)
  • Returns ((s, e) => void)

  • set dataPreLoad(ev): void
  • Parameters

    Returns void

  • get dataView(): any[]
  • Returns the currently transformed paged/filtered/sorted/grouped/pinned/unpinned row data, displayed in the grid.

    Example

    const dataView = this.grid.dataView;
    

    Returns any[]

  • get defaultHeaderGroupMinWidth(): number
  • Returns the IgxGridHeaderGroupComponent's minimum allowed width.

    Remarks

    Used internally for restricting header group component width. The values below depend on the header cell default right/left padding values.

    Returns number

  • get defaultRowHeight(): number
  • Gets the default row height.

    Example

    const rowHeigh = this.grid.defaultRowHeight;
    

    Returns number

  • get densityChanged(): ((s, e) => void)
  • Returns ((s, e) => void)

  • set densityChanged(ev): void
  • Parameters

    Returns void

  • get displayDensity(): DisplayDensity
  • Returns the theme of the component. The default theme is comfortable. Available options are comfortable, cosy, compact.

    let componentTheme = this.component.displayDensity;
    

    Returns DisplayDensity

  • set displayDensity(v): void
  • Parameters

    Returns void

  • get dragGhostCustomTemplate(): FunctionComponent<{
        dataContext: IgrGridRowDragGhostContext;
    }> | Component<{
        dataContext: IgrGridRowDragGhostContext;
    }, {}, any>
  • Gets the custom template, if any, used for row drag ghost.

    Returns FunctionComponent<{
        dataContext: IgrGridRowDragGhostContext;
    }> | Component<{
        dataContext: IgrGridRowDragGhostContext;
    }, {}, any>

  • set dragGhostCustomTemplate(v): void
  • Parameters

    Returns void

  • get dragIndicatorIconTemplate(): FunctionComponent<{
        dataContext: IgrGridEmptyTemplateContext;
    }> | Component<{
        dataContext: IgrGridEmptyTemplateContext;
    }, {}, any>
  • The custom template, if any, that should be used when rendering the row drag indicator icon

    Returns FunctionComponent<{
        dataContext: IgrGridEmptyTemplateContext;
    }> | Component<{
        dataContext: IgrGridEmptyTemplateContext;
    }, {}, any>

  • set dragIndicatorIconTemplate(v): void
  • Parameters

    Returns void

  • get dropAreaMessage(): string
  • Returns string

  • set dropAreaMessage(v): void
  • Parameters

    • v: string

    Returns void

  • get dropAreaTemplate(): FunctionComponent<{
        dataContext: any;
    }> | Component<{
        dataContext: any;
    }, {}, any>
  • Returns FunctionComponent<{
        dataContext: any;
    }> | Component<{
        dataContext: any;
    }, {}, any>

  • set dropAreaTemplate(v): void
  • Parameters

    • v: FunctionComponent<{
          dataContext: any;
      }> | Component<{
          dataContext: any;
      }, {}, any>

    Returns void

  • get emptyFilteredGridMessage(): string
  • Returns string

  • set emptyFilteredGridMessage(v): void
  • Parameters

    • v: string

    Returns void

  • get emptyGridMessage(): string
  • Returns string

  • set emptyGridMessage(v): void
  • Parameters

    • v: string

    Returns void

  • get emptyGridTemplate(): FunctionComponent<{
        dataContext: any;
    }> | Component<{
        dataContext: any;
    }, {}, any>
  • Returns FunctionComponent<{
        dataContext: any;
    }> | Component<{
        dataContext: any;
    }, {}, any>

  • set emptyGridTemplate(v): void
  • Parameters

    • v: FunctionComponent<{
          dataContext: any;
      }> | Component<{
          dataContext: any;
      }, {}, any>

    Returns void

  • get excelStyleHeaderIconTemplate(): FunctionComponent<{
        dataContext: IgrGridHeaderTemplateContext;
    }> | Component<{
        dataContext: IgrGridHeaderTemplateContext;
    }, {}, any>
  • Gets the excel style header icon.

    Returns FunctionComponent<{
        dataContext: IgrGridHeaderTemplateContext;
    }> | Component<{
        dataContext: IgrGridHeaderTemplateContext;
    }, {}, any>

  • set excelStyleHeaderIconTemplate(v): void
  • Parameters

    Returns void

  • get filterMode(): FilterMode
  • Returns FilterMode

  • set filterMode(v): void
  • Parameters

    Returns void

  • get filterStrategy(): IgrFilteringStrategy
  • Returns IgrFilteringStrategy

  • set filterStrategy(v): void
  • Parameters

    Returns void

  • get filteredData(): any
  • Returns an array of objects containing the filtered data.

    Example

    let filteredData = this.grid.filteredData;
    

    Returns any

  • get filteredSortedData(): any[]
  • Returns an array containing the filtered sorted data.

    Example

    const filteredSortedData = this.grid1.filteredSortedData;
    

    Returns any[]

  • get filteringExpressionsTree(): IgrFilteringExpressionsTree
  • Returns IgrFilteringExpressionsTree

  • set filteringExpressionsTree(v): void
  • Parameters

    Returns void

  • get filteringLogic(): FilteringLogic
  • Returns FilteringLogic

  • set filteringLogic(v): void
  • Parameters

    Returns void

  • get gridCopy(): ((s, e) => void)
  • Emitted when a copy operation is executed.

    Remarks

    Fired only if copy behavior is enabled through the [clipboardOptions]IgxGridBaseDirective#clipboardOptions.

    Returns ((s, e) => void)

  • set gridCopy(ev): void
  • Parameters

    Returns void

  • get groupingDone(): ((s, e) => void)
  • Returns ((s, e) => void)

  • set groupingDone(ev): void
  • Parameters

    Returns void

  • get groupsExpanded(): boolean
  • Returns boolean

  • set groupsExpanded(v): void
  • Parameters

    • v: boolean

    Returns void

  • get groupsRecords(): IgrGroupByRecord[]
  • Gets the hierarchical representation of the group by records.

    Example

    let groupRecords = this.grid.groupsRecords;
    

    Returns IgrGroupByRecord[]

  • get headerCollapsedIndicatorTemplate(): FunctionComponent<{
        dataContext: IgrGridTemplateContext;
    }> | Component<{
        dataContext: IgrGridTemplateContext;
    }, {}, any>
  • Gets the row collapse indicator template.

    Returns FunctionComponent<{
        dataContext: IgrGridTemplateContext;
    }> | Component<{
        dataContext: IgrGridTemplateContext;
    }, {}, any>

  • set headerCollapsedIndicatorTemplate(v): void
  • Parameters

    Returns void

  • get headerExpandedIndicatorTemplate(): FunctionComponent<{
        dataContext: IgrGridTemplateContext;
    }> | Component<{
        dataContext: IgrGridTemplateContext;
    }, {}, any>
  • Gets the header expand indicator template.

    Returns FunctionComponent<{
        dataContext: IgrGridTemplateContext;
    }> | Component<{
        dataContext: IgrGridTemplateContext;
    }, {}, any>

  • set headerExpandedIndicatorTemplate(v): void
  • Parameters

    Returns void

  • get hiddenColumnsCount(): number
  • Gets the number of hidden columns.

    Example

    const hiddenCol = this.grid.hiddenColumnsCount;
    ``

    Returns number

  • get hideGroupedColumns(): boolean
  • Returns boolean

  • set hideGroupedColumns(v): void
  • Parameters

    • v: boolean

    Returns void

  • get hideRowSelectors(): boolean
  • Gets/Sets if the row selectors are hidden.

    Remarks

    By default row selectors are shown

    Returns boolean

  • set hideRowSelectors(v): void
  • Parameters

    • v: boolean

    Returns void

  • get id(): string
  • Returns string

  • set id(v): void
  • Parameters

    • v: string

    Returns void

  • get isLoading(): boolean
  • Returns boolean

  • set isLoading(v): void
  • Parameters

    • v: boolean

    Returns void

  • get loadingGridTemplate(): FunctionComponent<{
        dataContext: any;
    }> | Component<{
        dataContext: any;
    }, {}, any>
  • Returns FunctionComponent<{
        dataContext: any;
    }> | Component<{
        dataContext: any;
    }, {}, any>

  • set loadingGridTemplate(v): void
  • Parameters

    • v: FunctionComponent<{
          dataContext: any;
      }> | Component<{
          dataContext: any;
      }, {}, any>

    Returns void

  • get locale(): string
  • Gets/Sets the locale.

    Remarks

    If not set, returns browser's language.

    Returns string

  • set locale(v): void
  • Parameters

    • v: string

    Returns void

  • get moving(): boolean
  • Controls whether columns moving is enabled in the grid.

    Returns boolean

  • set moving(v): void
  • Parameters

    • v: boolean

    Returns void

  • get outlet(): IgrOverlayOutletDirective
  • Gets/Sets the outlet used to attach the grid's overlays to.

    Remark

    If set, returns the outlet defined outside the grid. Otherwise returns the grid's internal outlet directive.

    Returns IgrOverlayOutletDirective

  • set outlet(v): void
  • Parameters

    Returns void

  • get pagingMode(): GridPagingMode
  • Returns GridPagingMode

  • set pagingMode(v): void
  • Parameters

    Returns void

  • get pinnedColumns(): IgrColumn<IIgrColumnProps>[]
  • Gets an array of the pinned IgxColumnComponents.

    Example

    const pinnedColumns = this.grid.pinnedColumns.
    

    Returns IgrColumn<IIgrColumnProps>[]

  • get pinnedColumnsCount(): number
  • Gets the number of pinned columns.

    Returns number

  • get pinning(): IgrPinningConfig
  • Returns IgrPinningConfig

  • set pinning(v): void
  • Parameters

    Returns void

  • get primaryKey(): string
  • Returns string

  • set primaryKey(v): void
  • Parameters

    • v: string

    Returns void

  • get rangeSelected(): ((s, e) => void)
  • Emitted when making a range selection.

    Remarks

    Range selection can be made either through drag selection or through keyboard selection.

    Returns ((s, e) => void)

  • set rangeSelected(ev): void
  • Parameters

    Returns void

  • get rendered(): ((s, e) => void)
  • Emitted after the ngAfterViewInit hook. At this point the grid exists in the DOM

    Returns ((s, e) => void)

  • set rendered(ev): void
  • Parameters

    Returns void

  • get resourceStrings(): IgrGridResourceStrings
  • Gets/Sets the resource strings.

    Remarks

    By default it uses EN resources.

    Returns IgrGridResourceStrings

  • set resourceStrings(v): void
  • Parameters

    Returns void

  • get rowAddTextTemplate(): FunctionComponent<{
        dataContext: IgrGridEmptyTemplateContext;
    }> | Component<{
        dataContext: IgrGridEmptyTemplateContext;
    }, {}, any>
  • Gets the row add text template.

    Returns FunctionComponent<{
        dataContext: IgrGridEmptyTemplateContext;
    }> | Component<{
        dataContext: IgrGridEmptyTemplateContext;
    }, {}, any>

  • set rowAddTextTemplate(v): void
  • Parameters

    Returns void

  • get rowClasses(): any
  • Returns any

  • set rowClasses(v): void
  • Parameters

    • v: any

    Returns void

  • get rowCollapsedIndicatorTemplate(): FunctionComponent<{
        dataContext: IgrGridRowTemplateContext;
    }> | Component<{
        dataContext: IgrGridRowTemplateContext;
    }, {}, any>
  • Gets the row collapse indicator template.

    Returns FunctionComponent<{
        dataContext: IgrGridRowTemplateContext;
    }> | Component<{
        dataContext: IgrGridRowTemplateContext;
    }, {}, any>

  • set rowCollapsedIndicatorTemplate(v): void
  • Parameters

    Returns void

  • get rowDragEnd(): ((s, e) => void)
  • Emitted when dropping a row.

    Remarks

    Return the dropped row.

    Returns ((s, e) => void)

  • set rowDragEnd(ev): void
  • Parameters

    Returns void

  • get rowDragStart(): ((s, e) => void)
  • Emitted when start dragging a row.

    Remarks

    Return the dragged row.

    Returns ((s, e) => void)

  • set rowDragStart(ev): void
  • Parameters

    Returns void

  • get rowDraggable(): boolean
  • Returns boolean

  • set rowDraggable(v): void
  • Parameters

    • v: boolean

    Returns void

  • get rowEditable(): boolean
  • Returns boolean

  • set rowEditable(v): void
  • Parameters

    • v: boolean

    Returns void

  • get rowExpandedIndicatorTemplate(): FunctionComponent<{
        dataContext: IgrGridRowTemplateContext;
    }> | Component<{
        dataContext: IgrGridRowTemplateContext;
    }, {}, any>
  • Gets the row expand indicator template.

    Returns FunctionComponent<{
        dataContext: IgrGridRowTemplateContext;
    }> | Component<{
        dataContext: IgrGridRowTemplateContext;
    }, {}, any>

  • set rowExpandedIndicatorTemplate(v): void
  • Parameters

    Returns void

  • get rowHeight(): number
  • Gets/Sets the width of the grid.

    Example

    let gridWidth = this.grid.width;
    

    Returns number

  • set rowHeight(v): void
  • Parameters

    • v: number

    Returns void

  • get rowSelection(): GridSelectionMode
  • Gets/Sets row selection mode

    Remarks

    By default the row selection mode is 'none' Note that in IgxGrid and IgxHierarchicalGrid 'multipleCascade' behaves like 'multiple'

    Returns GridSelectionMode

  • set rowSelection(v): void
  • Parameters

    Returns void

  • get rowStyles(): any
  • Returns any

  • set rowStyles(v): void
  • Parameters

    • v: any

    Returns void

  • get selectRowOnClick(): boolean
  • Gets/Sets whether clicking over a row should select/deselect it

    Remarks

    By default it is set to true enabled: boolean

    Returns boolean

  • set selectRowOnClick(v): void
  • Parameters

    • v: boolean

    Returns void

  • get selectedCells(): IgrCellType[]
  • Returns an array of the selected IgxGridCells.

    Example

    const selectedCells = this.grid.selectedCells;
    

    Returns IgrCellType[]

  • get selectedRows(): any[]
  • Returns any[]

  • set selectedRows(v): void
  • Parameters

    • v: any[]

    Returns void

  • get shouldGenerate(): boolean
  • Gets/Sets whether the columns should be auto-generated once again after the initialization of the grid

    Remarks

    This will allow to bind the grid to remote data and having auto-generated columns at the same time. Note that after generating the columns, this property would be disabled to avoid re-creating columns each time a new data is assigned.

    Example

    this.grid.shouldGenerate = true;
    

    Returns boolean

  • set shouldGenerate(v): void
  • Parameters

    • v: boolean

    Returns void

  • get showGroupArea(): boolean
  • Returns boolean

  • set showGroupArea(v): void
  • Parameters

    • v: boolean

    Returns void

  • get showSummaryOnCollapse(): boolean
  • Returns boolean

  • set showSummaryOnCollapse(v): void
  • Parameters

    • v: boolean

    Returns void

  • get snackbarDisplayTime(): number
  • Gets/Sets the display time for the row adding snackbar notification.

    Remarks

    By default it is 6000ms.

    Returns number

  • set snackbarDisplayTime(v): void
  • Parameters

    • v: number

    Returns void

  • get sortAscendingHeaderIconTemplate(): FunctionComponent<{
        dataContext: IgrGridHeaderTemplateContext;
    }> | Component<{
        dataContext: IgrGridHeaderTemplateContext;
    }, {}, any>
  • The custom template, if any, that should be used when rendering a header sorting indicator when columns are sorted in asc order.

    Returns FunctionComponent<{
        dataContext: IgrGridHeaderTemplateContext;
    }> | Component<{
        dataContext: IgrGridHeaderTemplateContext;
    }, {}, any>

  • set sortAscendingHeaderIconTemplate(v): void
  • Parameters

    Returns void

  • get sortDescendingHeaderIconTemplate(): FunctionComponent<{
        dataContext: IgrGridHeaderTemplateContext;
    }> | Component<{
        dataContext: IgrGridHeaderTemplateContext;
    }, {}, any>
  • The custom template, if any, that should be used when rendering a header sorting indicator when columns are sorted in desc order.

    Returns FunctionComponent<{
        dataContext: IgrGridHeaderTemplateContext;
    }> | Component<{
        dataContext: IgrGridHeaderTemplateContext;
    }, {}, any>

  • set sortDescendingHeaderIconTemplate(v): void
  • Parameters

    Returns void

  • get sortHeaderIconTemplate(): FunctionComponent<{
        dataContext: IgrGridHeaderTemplateContext;
    }> | Component<{
        dataContext: IgrGridHeaderTemplateContext;
    }, {}, any>
  • Gets custom template, if any, that should be used when rendering a header sorting indicator when columns are not sorted.

    Returns FunctionComponent<{
        dataContext: IgrGridHeaderTemplateContext;
    }> | Component<{
        dataContext: IgrGridHeaderTemplateContext;
    }, {}, any>

  • set sortHeaderIconTemplate(v): void
  • Parameters

    Returns void

  • get sortStrategy(): IgrGridSortingStrategy
  • Returns IgrGridSortingStrategy

  • set sortStrategy(v): void
  • Parameters

    Returns void

  • get sortingExpressions(): IgrSortingExpression[]
  • Returns IgrSortingExpression[]

  • set sortingExpressions(v): void
  • Parameters

    Returns void

  • get sortingOptions(): IgrSortingOptions
  • Returns IgrSortingOptions

  • set sortingOptions(v): void
  • Parameters

    Returns void

  • get summaryCalculationMode(): GridSummaryCalculationMode
  • Returns GridSummaryCalculationMode

  • set summaryCalculationMode(v): void
  • Parameters

    Returns void

  • get summaryPosition(): GridSummaryPosition
  • Returns GridSummaryPosition

  • set summaryPosition(v): void
  • Parameters

    Returns void

  • get summaryRowHeight(): number
  • Get/Set IgxSummaryRow height

    Returns number

  • set summaryRowHeight(v): void
  • Parameters

    • v: number

    Returns void

  • get toolbarExporting(): ((s, e) => void)
  • Emitted when an export process is initiated by the user.

    Example

    toolbarExporting(event: IGridToolbarExportEventArgs){
    const toolbarExporting = event;
    }

    Returns ((s, e) => void)

  • set toolbarExporting(ev): void
  • Parameters

    Returns void

  • get totalItemCount(): number
  • Gets/Sets the total number of records in the data source.

    Remarks

    This property is required for remote grid virtualization to function when it is bound to remote data.

    Example

    const itemCount = this.grid1.totalItemCount;
    this.grid1.totalItemCount = 55;

    Returns number

  • set totalItemCount(v): void
  • Parameters

    • v: number

    Returns void

  • get totalRecords(): number
  • Returns the total number of records.

    Remarks

    Only functions when paging is enabled.

    Example

    const totalRecords = this.grid.totalRecords;
    

    Returns number

  • set totalRecords(v): void
  • Parameters

    • v: number

    Returns void

  • get unpinnedColumns(): IgrColumn<IIgrColumnProps>[]
  • Gets an array of unpinned IgxColumnComponents.

    Example

    const unpinnedColumns = this.grid.unpinnedColumns.
    

    Returns IgrColumn<IIgrColumnProps>[]

  • get validationTrigger(): GridValidationTrigger
  • Returns GridValidationTrigger

  • set validationTrigger(v): void
  • Parameters

    Returns void

  • get virtualizationState(): IgrForOfState
  • Returns the state of the grid virtualization.

    Remarks

    Includes the start index and how many records are rendered.

    Example

    const gridVirtState = this.grid1.virtualizationState;
    

    Returns IgrForOfState

  • get visibleColumns(): IgrColumn<IIgrColumnProps>[]
  • Returns an array of visible IgxColumnComponents.

    Example

    const visibleColumns = this.grid.visibleColumns.
    

    Returns IgrColumn<IIgrColumnProps>[]

Methods

  • Creates a new IgxGridRowComponent and adds the data record to the end of the data source.

    Example

    this.grid1.addRow(record);
    

    data

    Parameters

    • data: any

    Returns void

  • Parameters

    • rowID: any
    • Optional asChild: boolean

    Returns void

  • Enters add mode by spawning the UI at the specified index.

    Remarks

    Accepted values for index are integers from 0 to this.grid.dataView.length

    Example

    this.grid.beginAddRowByIndex(0);
    

    index - The index to spawn the UI at. Accepts integers from 0 to this.grid.dataView.length

    Parameters

    • index: number
        • The index to spawn the UI at. Accepts integers from 0 to this.grid.dataView.length

    Returns void

  • Deselect selected cells.

    Example

    this.grid.clearCellSelection();
    

    Returns void

  • If name is provided, clears the filtering state of the corresponding IgxColumnComponent.

    Remarks

    Otherwise clears the filtering state of all IgxColumnComponents.

    Example

    this.grid.clearFilter();
    

    name

    Parameters

    • name: string

    Returns void

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

    Remarks

    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.

    Example

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

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

    Parameters

    • name: string
      • Name of column or array of column names to be ungrouped.

    Returns void

  • Removes all the highlights in the cell.

    Example

    this.grid.clearSearch();
    

    Returns void

  • If name is provided, clears the sorting state of the corresponding IgxColumnComponent.

    Remarks

    otherwise clears the sorting state of all IgxColumnComponent.

    Example

    this.grid.clearSort();
    

    name

    Parameters

    • name: string

    Returns void

  • Closes the advanced filtering dialog. applyChanges indicates whether the changes should be applied

    Parameters

    • applyChanges: boolean
      • indicates whether the changes should be applied

    Returns void

  • Collapses all rows.

    Example

    this.grid.collapseAll();
    

    Returns void

  • Collapses the row by its id.

    Remarks

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

    Example

    this.grid.collapseRow(rowID);
    

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

    Parameters

    • rowID: any
      • The row id - primaryKey value or the data record instance.

    Returns void

  • Catches exceptions generated in descendant components. Unhandled exceptions will cause the entire component tree to unmount.

    Parameters

    • error: Error
    • errorInfo: ErrorInfo

    Returns void

  • Called immediately after updating occurs. Not called for the initial render.

    The snapshot is only present if getSnapshotBeforeUpdate is present and returns non-null.

    Parameters

    • prevProps: Readonly<IIgrGridProps>
    • prevState: Readonly<{}>
    • Optional snapshot: any

    Returns void

  • Called immediately before a component is destroyed. Perform any necessary cleanup in this method, such as cancelled network requests, or cleaning up any DOM elements created in componentDidMount.

    Returns void

  • Removes the IgxGridRowComponent and the corresponding data record by primary key.

    Remarks

    Requires that the primaryKey property is set. The method accept rowSelector as a parameter, which is the rowID.

    Example

    this.grid1.deleteRow(0);
    

    rowSelector

    Parameters

    • rowSelector: any

    Returns any

  • Deselects all columns

    Example

    this.grid.deselectAllColumns();
    

    Returns void

  • Deselects all rows

    Remarks

    By default if filtering is in place, selectAllRows() and deselectAllRows() select/deselect all filtered rows. If you set the parameter onlyFilterData to false that will deselect all rows in the grid exept deleted rows.

    Example

    this.grid.deselectAllRows();
    

    onlyFilterData

    Parameters

    • Optional onlyFilterData: boolean

    Returns void

  • Parameters

    • columns: string[]

    Returns void

  • Parameters

    • rowIDs: any[]

    Returns void

  • Deselect all rows within a group. groupRow The group record which rows would be deselected.

    Example

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

    Parameters

    Returns void

  • Parameters

    • rest: any[]

    Returns void

  • Parameters

    • rest: any[]

    Returns void

  • Parameters

    • commit: boolean
    • evt: any

    Returns void

  • Expands all rows.

    Example

    this.grid.expandAll();
    

    Returns void

  • Expands the row by its id.

    Remarks

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

    Example

    this.grid.expandRow(rowID);
    

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

    Parameters

    • rowID: any
      • The row id - primaryKey value or the data record instance.

    Returns void

  • Parameters

    • value: any
    • condition: any
    • ignoreCase: any

    Returns void

  • Parameters

    • name: string

    Returns any

  • Parameters

    • name: string

    Returns any

  • Parameters

    • text: string
    • Optional caseSensitive: boolean
    • Optional exactMatch: boolean

    Returns number

  • Parameters

    • text: string
    • Optional caseSensitive: boolean
    • Optional exactMatch: boolean

    Returns number

  • Parameters

    • Optional callback: (() => void)
        • (): void
        • Returns void

    Returns void

  • Expands the specified group and all of its parent groups. groupRow The group record to fully expand.

    Example

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

    Parameters

    Returns void

  • Parameters

    • rowIndex: number
    • columnField: string

    Returns IgrCellType

  • Parameters

    • rowSelector: any
    • columnField: string

    Returns IgrCellType

  • Gets calculated width of the pinned area.

    Example

    const pinnedWidth = this.grid.getPinnedWidth();
    

    takeHidden If we should take into account the hidden columns in the pinned area.

    Parameters

    • Optional takeHidden: boolean
      • If we should take into account the hidden columns in the pinned area.

    Returns void

  • Returns the IgxGridRow by index.

    Example

    const myRow = grid.getRowByIndex(1);
    

    index

    Parameters

    • index: number

    Returns IgrRowType

  • Returns IgxGridRow object by the specified primary key.

    Remarks

    Requires that the primaryKey property is set.

    Example

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

    keyValue

    Parameters

    • key: any

    Returns IgrRowType

  • Returns the data that is contained in the row component.

    Remarks

    If the primary key is not specified the row selector match the row data.

    Example

    const data = grid.getRowData(94741);
    

    rowSelector correspond to rowID

    Parameters

    • rowSelector: any
      • correspond to rowID

    Returns any

  • Parameters

    • formatters: boolean
    • Optional headers: boolean

    Returns void

  • Parameters

    • Optional formatters: boolean
    • Optional headers: boolean

    Returns any[]

  • Runs before React applies the result of render to the document, and returns an object to be given to componentDidUpdate. Useful for saving things such as scroll position before render causes changes to it.

    Note: the presence of getSnapshotBeforeUpdate prevents any of the deprecated lifecycle events from running.

    Parameters

    Returns any

  • Parameters

    Returns void

  • Returns if a group is expanded or not. group The group record.

    Example

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

    Parameters

    Returns boolean

  • Returns whether the record is pinned or not. rowIndex Index of the record in the filteredSortedData collection.

    Parameters

    • rowIndex: number
      • Index of the record in the filteredSortedData collection.

    Returns void

  • Triggers change detection for the IgxGridComponent. Calling markForCheck also triggers the grid pipes explicitly, resulting in all updates being processed. May degrade performance if used when not needed, or if misused:

    // DON'Ts:
    // don't call markForCheck from inside a loop
    // don't call markForCheck when a primitive has changed
    grid.data.forEach(rec => {
    rec = newValue;
    grid.markForCheck();
    });
    // DOs
    // call markForCheck after updating a nested property
    grid.data.forEach(rec => {
    rec.nestedProp1.nestedProp2 = newValue;
    });
    grid.markForCheck();

    Example

    grid.markForCheck();
    

    Returns void

  • Parameters

    • rowIndex: number
    • visibleColIndex: number
    • cb: any

    Returns void

  • Parameters

    • columnName: string
    • index: any

    Returns boolean

  • Parameters

    • rowID: any
    • Optional index: number

    Returns boolean

  • Recalculates all widths of columns that have size set to auto.

    Example

    this.grid1.recalculateAutoSizes();
    

    Returns void

  • Recalculates grid width/height dimensions.

    Remarks

    Should be run when changing DOM elements dimentions manually that affect the grid's size.

    Example

    this.grid.reflow();
    

    Returns void

  • Parameters

    • Optional updateActiveInfo: boolean
    • Optional endEdit: boolean

    Returns number

  • Returns DetailedReactHTMLElement<any, HTMLElement>

  • Selects all columns

    Example

    this.grid.deselectAllColumns();
    

    Returns void

  • Selects all rows

    Remarks

    By default if filtering is in place, selectAllRows() and deselectAllRows() select/deselect all filtered rows. If you set the parameter onlyFilterData to false that will select all rows in the grid exept deleted rows.

    Example

    this.grid.selectAllRows();
    this.grid.selectAllRows(false);

    onlyFilterData

    Parameters

    • Optional onlyFilterData: boolean

    Returns void

  • Parameters

    • columns: string[]
    • Optional clearCurrentSelection: boolean

    Returns void

  • Parameters

    • rowIDs: any[]
    • Optional clearCurrentSelection: boolean

    Returns void

  • Parameters

    Returns void

  • Parameters

    • element: any

    Returns void

  • Type parameters

    Type Parameters

    • K extends never

    Parameters

    • state: {} | ((prevState, props) => {} | Pick<{}, K>) | Pick<{}, K>
    • Optional callback: (() => void)
        • (): void
        • Returns void

    Returns void

  • Parameters

    • nextProps: any
    • nextState: any

    Returns boolean

  • Toggles the expansion state of all group rows recursively.

    Example

    this.grid.toggleAllGroupRows;
    

    Returns void

  • Toggles the expansion state of a group. groupRow The group record to toggle.

    Example

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

    Parameters

    Returns void

  • Toggles the row by its id.

    Remarks

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

    Example

    this.grid.toggleRow(rowID);
    

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

    Parameters

    • rowID: any
      • The row id - primaryKey value or the data record instance.

    Returns void

  • Parameters

    • columnName: string
    • index: any

    Returns boolean

  • Parameters

    • rowID: any

    Returns boolean

  • Parameters

    • value: any
    • rowSelector: any
    • column: string

    Returns void

  • Parameters

    • value: any
    • rowSelector: any

    Returns void