Pivot Grid provides a way to present and manipulate data in a pivot table view.
Properties
Section titled "Properties"autoGenerateConfig
Section titled "autoGenerateConfig"Gets/Sets whether to auto-generate the pivot configuration based on the provided data.
autoGenerateConfig: boolean Gets/Sets the array of data that populates the component.
data: any[] defaultExpandState
Section titled "defaultExpandState"Gets/Sets the default expand state for all rows.
defaultExpandState: boolean emptyPivotGridTemplate
Section titled "emptyPivotGridTemplate"Gets/Sets a custom template when pivot grid is empty.
emptyPivotGridTemplate: (ctx: void) => React.ReactNode pivotConfiguration
Section titled "pivotConfiguration"Gets/Sets the pivot configuration with all related dimensions and values.
pivotConfiguration: IgrPivotConfiguration pivotUI
Section titled "pivotUI"pivotUI: IgrPivotUISettings rowDimensionHeaderTemplate
Section titled "rowDimensionHeaderTemplate"rowDimensionHeaderTemplate: (ctx: IgrColumnTemplateContext) => React.ReactNode superCompactMode
Section titled "superCompactMode"Enables a super compact theme for the component.
superCompactMode: boolean valueChipTemplate
Section titled "valueChipTemplate"Gets/Sets a custom template for the value chips.
valueChipTemplate: (ctx: IgrPivotGridValueTemplateContext) => React.ReactNode addRowEmptyTemplate
Section titled "addRowEmptyTemplate"addRowEmptyTemplate: (ctx: void) => React.ReactNode advancedFilteringExpressionsTree
Section titled "advancedFilteringExpressionsTree"advancedFilteringExpressionsTree: IgrFilteringExpressionsTree allowAdvancedFiltering
Section titled "allowAdvancedFiltering"allowAdvancedFiltering: boolean allowFiltering
Section titled "allowFiltering"allowFiltering: boolean autoGenerate
Section titled "autoGenerate"autoGenerate: boolean autoGenerateExclude
Section titled "autoGenerateExclude"autoGenerateExclude: string[] batchEditing
Section titled "batchEditing"batchEditing: boolean cellMergeMode
Section titled "cellMergeMode"cellMergeMode: GridCellMergeMode cellSelection
Section titled "cellSelection"cellSelection: GridSelectionMode clipboardOptions
Section titled "clipboardOptions"clipboardOptions: IgrClipboardOptions columnSelection
Section titled "columnSelection"columnSelection: GridSelectionMode columnWidth
Section titled "columnWidth"columnWidth: string dataCloneStrategy
Section titled "dataCloneStrategy"dataCloneStrategy: IgrDataCloneStrategy dragGhostCustomTemplate
Section titled "dragGhostCustomTemplate"dragGhostCustomTemplate: (ctx: IgrGridRowDragGhostContext) => React.ReactNode dragIndicatorIconTemplate
Section titled "dragIndicatorIconTemplate"dragIndicatorIconTemplate: (ctx: IgrGridEmptyTemplateContext) => React.ReactNode emptyFilteredGridMessage
Section titled "emptyFilteredGridMessage"emptyFilteredGridMessage: string emptyGridMessage
Section titled "emptyGridMessage"emptyGridMessage: string emptyGridTemplate
Section titled "emptyGridTemplate"emptyGridTemplate: (ctx: IgrGridTemplateContext) => React.ReactNode excelStyleHeaderIconTemplate
Section titled "excelStyleHeaderIconTemplate"excelStyleHeaderIconTemplate: (ctx: IgrGridHeaderTemplateContext) => React.ReactNode expansionStates
Section titled "expansionStates"expansionStates: Map<any, boolean> filteringExpressionsTree
Section titled "filteringExpressionsTree"filteringExpressionsTree: IgrFilteringExpressionsTree filteringLogic
Section titled "filteringLogic"filteringLogic: FilteringLogic filterMode
Section titled "filterMode"filterMode: FilterMode filterStrategy
Section titled "filterStrategy"filterStrategy: IgrFilteringStrategy headerCollapsedIndicatorTemplate
Section titled "headerCollapsedIndicatorTemplate"headerCollapsedIndicatorTemplate: (ctx: IgrGridTemplateContext) => React.ReactNode headerExpandedIndicatorTemplate
Section titled "headerExpandedIndicatorTemplate"headerExpandedIndicatorTemplate: (ctx: IgrGridTemplateContext) => React.ReactNode headSelectorTemplate
Section titled "headSelectorTemplate"headSelectorTemplate: (ctx: IgrHeadSelectorTemplateContext) => React.ReactNode height
Section titled "height"height: string hideRowSelectors
Section titled "hideRowSelectors"hideRowSelectors: boolean isLoading
Section titled "isLoading"isLoading: boolean loadingGridTemplate
Section titled "loadingGridTemplate"loadingGridTemplate: (ctx: IgrGridTemplateContext) => React.ReactNode locale
Section titled "locale"locale: string mergeStrategy
Section titled "mergeStrategy"mergeStrategy: IgrGridMergeStrategy moving
Section titled "moving"moving: boolean outlet
Section titled "outlet"outlet: IgrOverlayOutletDirective pagingMode
Section titled "pagingMode"pagingMode: GridPagingMode pinning
Section titled "pinning"pinning: IgrPinningConfig primaryKey
Section titled "primaryKey"primaryKey: string resourceStrings
Section titled "resourceStrings"resourceStrings: IgrGridResourceStrings rowAddTextTemplate
Section titled "rowAddTextTemplate"rowAddTextTemplate: (ctx: IgrGridEmptyTemplateContext) => React.ReactNode rowClasses
Section titled "rowClasses"rowClasses: any rowCollapsedIndicatorTemplate
Section titled "rowCollapsedIndicatorTemplate"rowCollapsedIndicatorTemplate: (ctx: IgrGridRowTemplateContext) => React.ReactNode rowDraggable
Section titled "rowDraggable"rowDraggable: boolean rowEditable
Section titled "rowEditable"rowEditable: boolean rowEditActionsTemplate
Section titled "rowEditActionsTemplate"rowEditActionsTemplate: (ctx: IgrGridRowEditActionsTemplateContext) => React.ReactNode rowEditTextTemplate
Section titled "rowEditTextTemplate"rowEditTextTemplate: (ctx: IgrGridRowEditTextTemplateContext) => React.ReactNode rowExpandedIndicatorTemplate
Section titled "rowExpandedIndicatorTemplate"rowExpandedIndicatorTemplate: (ctx: IgrGridRowTemplateContext) => React.ReactNode rowHeight
Section titled "rowHeight"rowHeight: number rowSelection
Section titled "rowSelection"rowSelection: GridSelectionMode rowSelectorTemplate
Section titled "rowSelectorTemplate"rowSelectorTemplate: (ctx: IgrRowSelectorTemplateContext) => React.ReactNode rowStyles
Section titled "rowStyles"rowStyles: any selectRowOnClick
Section titled "selectRowOnClick"selectRowOnClick: boolean shouldGenerate
Section titled "shouldGenerate"shouldGenerate: boolean showSummaryOnCollapse
Section titled "showSummaryOnCollapse"showSummaryOnCollapse: boolean snackbarDisplayTime
Section titled "snackbarDisplayTime"snackbarDisplayTime: number sortAscendingHeaderIconTemplate
Section titled "sortAscendingHeaderIconTemplate"sortAscendingHeaderIconTemplate: (ctx: IgrGridHeaderTemplateContext) => React.ReactNode sortDescendingHeaderIconTemplate
Section titled "sortDescendingHeaderIconTemplate"sortDescendingHeaderIconTemplate: (ctx: IgrGridHeaderTemplateContext) => React.ReactNode sortHeaderIconTemplate
Section titled "sortHeaderIconTemplate"sortHeaderIconTemplate: (ctx: IgrGridHeaderTemplateContext) => React.ReactNode sortingExpressions
Section titled "sortingExpressions"sortingExpressions: IgrSortingExpression[] sortingOptions
Section titled "sortingOptions"sortingOptions: IgrSortingOptions sortStrategy
Section titled "sortStrategy"sortStrategy: IgrGridSortingStrategy summaryCalculationMode
Section titled "summaryCalculationMode"summaryCalculationMode: GridSummaryCalculationMode summaryPosition
Section titled "summaryPosition"summaryPosition: GridSummaryPosition summaryRowHeight
Section titled "summaryRowHeight"summaryRowHeight: number totalRecords
Section titled "totalRecords"totalRecords: number validationTrigger
Section titled "validationTrigger"validationTrigger: GridValidationTrigger width
Section titled "width"width: string Accessors
Section titled "Accessors"allDimensions
Section titled "allDimensions"Gets the full list of dimensions.
get allDimensions(): IgrPivotDimension[] Returns IgrPivotDimension[]
dimensionsSortingExpressions
Section titled "dimensionsSortingExpressions"Gets the sorting expressions generated for the dimensions.
get dimensionsSortingExpressions(): IgrSortingExpression[] Returns IgrSortingExpression[]
selectedRows
Section titled "selectedRows"get selectedRows(): any[] Returns any[]
actionStripComponents
Section titled "actionStripComponents"get actionStripComponents(): IgcActionStripToken[] Returns IgcActionStripToken[]
columnList
Section titled "columnList"get columnList(): IgrColumnComponent[] Returns IgrColumnComponent[]
columns
Section titled "columns"Gets an array of ColumnComponents.
get columns(): IgrColumnComponent[] Example
const colums = this.grid.columns. Returns IgrColumnComponent[]
dataRowList
Section titled "dataRowList"A list of currently rendered GridRowComponent's.
get dataRowList(): IgrRowDirective[] Example
const dataList = this.grid.dataRowList; Returns IgrRowDirective[]
dataView
Section titled "dataView"Returns the currently transformed paged/filtered/sorted/grouped/pinned/unpinned row data, displayed in the grid.
get dataView(): any[] Example
const dataView = this.grid.dataView; Returns any[]
defaultRowHeight
Section titled "defaultRowHeight"Gets the default row height.
get defaultRowHeight(): number Example
const rowHeigh = this.grid.defaultRowHeight; Returns number
filteredData
Section titled "filteredData"Returns an array of objects containing the filtered data.
get filteredData(): any Example
let filteredData = this.grid.filteredData; Returns any
filteredSortedData
Section titled "filteredSortedData"Returns an array containing the filtered sorted data.
get filteredSortedData(): any[] Example
const filteredSortedData = this.grid1.filteredSortedData; Returns any[]
hiddenColumnsCount
Section titled "hiddenColumnsCount"Gets the number of hidden columns.
get hiddenColumnsCount(): number Example
const hiddenCol = this.grid.hiddenColumnsCount;
`` Returns number
lastSearchInfo
Section titled "lastSearchInfo"paginationComponents
Section titled "paginationComponents"get paginationComponents(): IgrPaginatorComponent[] Returns IgrPaginatorComponent[]
pinnedColumns
Section titled "pinnedColumns"Gets an array of the pinned ColumnComponents.
get pinnedColumns(): IgrColumnComponent[] Example
const pinnedColumns = this.grid.pinnedColumns. Returns IgrColumnComponent[]
pinnedColumnsCount
Section titled "pinnedColumnsCount"Gets the number of pinned columns.
get pinnedColumnsCount(): number Returns number
pinnedEndColumns
Section titled "pinnedEndColumns"Gets an array of the pinned to the right ColumnComponents.
get pinnedEndColumns(): IgrColumnComponent[] Example
const pinnedColumns = this.grid.pinnedEndColumns. Returns IgrColumnComponent[]
pinnedRows
Section titled "pinnedRows"Gets an array of the pinned RowComponents.
get pinnedRows(): IgrGridRowComponent[] Example
const pinnedRow = this.grid.pinnedRows; Returns IgrGridRowComponent[]
pinnedStartColumns
Section titled "pinnedStartColumns"Gets an array of the pinned to the left ColumnComponents.
get pinnedStartColumns(): IgrColumnComponent[] Example
const pinnedColumns = this.grid.pinnedStartColumns. Returns IgrColumnComponent[]
rowList
Section titled "rowList"A list of GridRowComponent.
get rowList(): IgrRowDirective[] Example
const rowList = this.grid.rowList; Returns IgrRowDirective[]
toolbar
Section titled "toolbar"get toolbar(): IgrGridToolbarComponent[] Returns IgrGridToolbarComponent[]
unpinnedColumns
Section titled "unpinnedColumns"Gets an array of unpinned ColumnComponents.
get unpinnedColumns(): IgrColumnComponent[] Example
const unpinnedColumns = this.grid.unpinnedColumns. Returns IgrColumnComponent[]
virtualizationState
Section titled "virtualizationState"Returns the state of the grid virtualization.
get virtualizationState(): IgrForOfState Example
const gridVirtState = this.grid1.virtualizationState; Returns IgrForOfState
visibleColumns
Section titled "visibleColumns"Returns an array of visible ColumnComponents.
get visibleColumns(): IgrColumnComponent[] Example
const visibleColumns = this.grid.visibleColumns. Returns IgrColumnComponent[]
Methods
Section titled "Methods"autoSizeRowDimension
Section titled "autoSizeRowDimension"Auto-sizes row dimension cells.
autoSizeRowDimension(dimension: IgrPivotDimension): void Parameters
- dimension:
IgrPivotDimensionThe row dimension to size.
Returns void
Example
this.grid.autoSizeRowDimension(dimension); filterDimension
Section titled "filterDimension"Filters a single IPivotDimension.
filterDimension(dimension: IgrPivotDimension, value: any, conditionOrExpressionTree: IgrFilteringExpressionsTree | IgrFilteringOperation): void Parameters
- dimension:
IgrPivotDimension - value:
any - conditionOrExpressionTree:
IgrFilteringExpressionsTree | IgrFilteringOperation
Returns void
getColumnGroupExpandState
Section titled "getColumnGroupExpandState"getColumnGroupExpandState(col: IgrColumnComponent): void Parameters
- col:
IgrColumnComponent
Returns void
insertDimensionAt
Section titled "insertDimensionAt"Inserts dimension in target collection by type at specified index or at the collection's end.
insertDimensionAt(dimension: IgrPivotDimension, targetCollectionType: PivotDimensionType, index: number): void Parameters
- dimension:
IgrPivotDimensionThe dimension that will be added.
- targetCollectionType:
PivotDimensionTypeThe target collection type to add to. Can be Row, Column or Filter.
- index:
numberThe index in the collection at which to add. This parameter is optional. If not set it will add it to the end of the collection.
Returns void
Example
this.grid.insertDimensionAt(dimension, PivotDimensionType.Row, 1); insertValueAt
Section titled "insertValueAt"Inserts value at specified index or at the end.
insertValueAt(value: IgrPivotValue, index: number): void Parameters
- value:
IgrPivotValueThe value definition that will be added.
- index:
numberThe index in the collection at which to add. This parameter is optional. If not set it will add it to the end of the collection.
Returns void
Example
this.grid.insertValueAt(value, 1); moveDimension
Section titled "moveDimension"Move dimension from its currently collection to the specified target collection by type at specified index or at the collection's end.
moveDimension(dimension: IgrPivotDimension, targetCollectionType: PivotDimensionType, index: number): void Parameters
- dimension:
IgrPivotDimensionThe dimension that will be moved.
- targetCollectionType:
PivotDimensionTypeThe target collection type to move it to. Can be Row, Column or Filter.
- index:
numberThe index in the collection at which to add. This parameter is optional. If not set it will add it to the end of the collection.
Returns void
Example
this.grid.moveDimension(dimension, PivotDimensionType.Row, 1); moveValue
Section titled "moveValue"Move value from its currently at specified index or at the end.
moveValue(value: IgrPivotValue, index: number): void Parameters
- value:
IgrPivotValueThe value that will be moved.
- index:
numberThe index in the collection at which to add. This parameter is optional. If not set it will add it to the end of the collection.
Returns void
Example
this.grid.moveValue(value, 1); notifyDimensionChange
Section titled "notifyDimensionChange"Notifies for dimension change.
notifyDimensionChange(regenerateColumns: boolean): void Parameters
- regenerateColumns:
boolean
Returns void
removeDimension
Section titled "removeDimension"Removes dimension from its currently collection.
removeDimension(dimension: IgrPivotDimension): void Parameters
- dimension:
IgrPivotDimensionThe dimension to be removed.
Returns void
Example
this.grid.removeDimension(dimension); removeValue
Section titled "removeValue"Removes value from collection.
removeValue(value: IgrPivotValue): void Parameters
- value:
IgrPivotValueThe value to be removed.
Returns void
Example
this.grid.removeValue(dimension); sortDimension
Section titled "sortDimension"Sort the dimension and its children in the provided direction.
sortDimension(dimension: IgrPivotDimension, sortDirection: SortingDirection): void Parameters
- dimension:
IgrPivotDimension - sortDirection:
SortingDirection
Returns void
Example
this.grid.sortDimension(dimension, SortingDirection.Asc); toggleColumn
Section titled "toggleColumn"toggleColumn(col: IgrColumnComponent): void Parameters
- col:
IgrColumnComponent
Returns void
toggleDimension
Section titled "toggleDimension"Toggles the dimension's enabled state on or off.
toggleDimension(dimension: IgrPivotDimension): void Parameters
- dimension:
IgrPivotDimensionThe dimension to be toggled.
Returns void
Example
this.grid.toggleDimension(dimension); toggleRowGroup
Section titled "toggleRowGroup"toggleRowGroup(col: IgrColumnComponent, newState: boolean): void Parameters
- col:
IgrColumnComponent - newState:
boolean
Returns void
toggleValue
Section titled "toggleValue"Toggles the value's enabled state on or off.
toggleValue(value: IgrPivotValue): void Parameters
- value:
IgrPivotValueThe value to be toggled.
Returns void
Example
this.grid.toggleValue(value); addRow
Section titled "addRow"Creates a new GridRowComponent and adds the data record to the end of the data source.
addRow(data: any): void Parameters
- data:
any
Returns void
Example
this.grid1.addRow(record); beginAddRowById
Section titled "beginAddRowById"Enters add mode by spawning the UI under the specified row by rowID.
beginAddRowById(rowID: any, asChild: boolean): void Parameters
- rowID:
anyThe rowID to spawn the add row UI for, or null to spawn it as the first record in the data view
- asChild:
booleanWhether the record should be added as a child. Only applicable to igxTreeGrid.
Returns void
Example
this.grid.beginAddRowById('ALFKI');
this.grid.beginAddRowById('ALFKI', true);
this.grid.beginAddRowById(null); beginAddRowByIndex
Section titled "beginAddRowByIndex"Enters add mode by spawning the UI at the specified index.
beginAddRowByIndex(index: number): void Parameters
- index:
numberThe index to spawn the UI at. Accepts integers from 0 to this.grid.dataView.length
Returns void
Example
this.grid.beginAddRowByIndex(0); clearCellSelection
Section titled "clearCellSelection"Deselect selected cells.
clearCellSelection(): void Returns void
Example
this.grid.clearCellSelection(); clearFilter
Section titled "clearFilter"If name is provided, clears the filtering state of the corresponding ColumnComponent.
clearFilter(name: string): void Parameters
- name:
string
Returns void
Example
this.grid.clearFilter(); clearSearch
Section titled "clearSearch"Removes all the highlights in the cell.
clearSearch(): void Returns void
Example
this.grid.clearSearch(); clearSort
Section titled "clearSort"If name is provided, clears the sorting state of the corresponding ColumnComponent.
clearSort(name: string): void Parameters
- name:
string
Returns void
Example
this.grid.clearSort(); closeAdvancedFilteringDialog
Section titled "closeAdvancedFilteringDialog"Closes the advanced filtering dialog.
closeAdvancedFilteringDialog(applyChanges: boolean): void Parameters
- applyChanges:
booleanindicates whether the changes should be applied
Returns void
collapseAll
Section titled "collapseAll"Collapses all rows.
collapseAll(): void Returns void
Example
this.grid.collapseAll(); collapseRow
Section titled "collapseRow"Collapses the row by its id.
collapseRow(rowID: any): void Parameters
- rowID:
anyThe row id - primaryKey value or the data record instance.
Returns void
Example
this.grid.collapseRow(rowID); deleteRow
Section titled "deleteRow"Removes the GridRowComponent and the corresponding data record by primary key.
deleteRow(rowSelector: any): any Parameters
- rowSelector:
any
Returns any
Example
this.grid1.deleteRow(0); deselectAllColumns
Section titled "deselectAllColumns"Deselects all columns
deselectAllColumns(): void Returns void
Example
this.grid.deselectAllColumns(); deselectAllRows
Section titled "deselectAllRows"Deselects all rows
deselectAllRows(onlyFilterData: boolean): void Parameters
- onlyFilterData:
boolean
Returns void
Example
this.grid.deselectAllRows(); deselectColumns
Section titled "deselectColumns"Deselect specified columns by field.
deselectColumns(columns: string[] | IgrColumnComponent[]): void Parameters
- columns:
string[] | IgrColumnComponent[]
Returns void
Example
this.grid.deselectColumns(['ID','Name']); deselectRows
Section titled "deselectRows"Deselect specified rows by ID.
deselectRows(rowIDs: any[]): void Parameters
- rowIDs:
any[]
Returns void
Example
this.grid.deselectRows([1,2,5]); disableSummaries
Section titled "disableSummaries"Disable summaries for the specified column.
disableSummaries(rest: any[]): void Parameters
- rest:
any[]
Returns void
Example
grid.disableSummaries('ProductName'); enableSummaries
Section titled "enableSummaries"Enables summaries for the specified column and applies your customSummary.
enableSummaries(rest: any[]): void Parameters
- rest:
any[]
Returns void
Example
grid.enableSummaries([{ fieldName: 'ProductName' }, { fieldName: 'ID' }]);Enable summaries for the listed columns.
endEdit
Section titled "endEdit"Finishes the row transactions on the current row and returns whether the grid editing was canceled.
endEdit(commit: boolean, evt: any): boolean Parameters
- commit:
boolean - evt:
any
Returns boolean
expandAll
Section titled "expandAll"Expands all rows.
expandAll(): void Returns void
Example
this.grid.expandAll(); expandRow
Section titled "expandRow"Expands the row by its id.
expandRow(rowID: any): void Parameters
- rowID:
anyThe row id - primaryKey value or the data record instance.
Returns void
Example
this.grid.expandRow(rowID); filter
Section titled "filter"Filters a single ColumnComponent.
filter(name: string, value: any, conditionOrExpressionTree: IgrFilteringExpressionsTree | IgrFilteringOperation, ignoreCase: boolean): void Parameters
- name:
string - value:
any - conditionOrExpressionTree:
IgrFilteringExpressionsTree | IgrFilteringOperation - ignoreCase:
boolean
Returns void
filterGlobal
Section titled "filterGlobal"Filters all the ColumnComponent in the GridComponent with the same condition.
filterGlobal(value: any, condition: any, ignoreCase: any): void Parameters
- value:
any - condition:
any - ignoreCase:
any
Returns void
findNext
Section titled "findNext"Finds the next occurrence of a given string in the grid and scrolls to the cell if it isn't visible.
findNext(text: string, caseSensitive: boolean, exactMatch: boolean): number Parameters
- text:
stringthe string to search.
- caseSensitive:
booleanoptionally, if the search should be case sensitive (defaults to false).
- exactMatch:
booleanoptionally, if the text should match the entire value (defaults to false).
Returns number
Example
this.grid.findNext("financial"); findPrev
Section titled "findPrev"Finds the previous occurrence of a given string in the grid and scrolls to the cell if it isn't visible.
findPrev(text: string, caseSensitive: boolean, exactMatch: boolean): number Parameters
- text:
stringthe string to search.
- caseSensitive:
booleanoptionally, if the search should be case sensitive (defaults to false).
- exactMatch:
booleanoptionally, if the text should match the entire value (defaults to false).
Returns number
Example
this.grid.findPrev("financial"); getColumnByName
Section titled "getColumnByName"Returns the ColumnComponent by field name.
getColumnByName(name: string): IgrColumnComponent Parameters
- name:
string
Returns IgrColumnComponent
Example
const myCol = this.grid1.getColumnByName("ID"); getColumnByVisibleIndex
Section titled "getColumnByVisibleIndex"getColumnByVisibleIndex(index: number): IgrColumnComponent Parameters
- index:
number
Returns IgrColumnComponent
getHeaderGroupWidth
Section titled "getHeaderGroupWidth"Gets the width to be set on GridHeaderGroupComponent.
getHeaderGroupWidth(column: IgrColumnComponent): string Parameters
- column:
IgrColumnComponent
Returns string
getNextCell
Section titled "getNextCell"Returns ICellPosition which defines the next cell,
according to the current position, that match specific criteria.
getNextCell(currRowIndex: number, curVisibleColIndex: number, callback: any): IgrCellPosition Parameters
- currRowIndex:
number - curVisibleColIndex:
number - callback:
any
Returns IgrCellPosition
Example
const nextEditableCellPosition = this.grid.getNextCell(0, 3, (column) => column.editable); getPinnedEndWidth
Section titled "getPinnedEndWidth"Gets calculated width of the pinned areas.
getPinnedEndWidth(takeHidden: boolean): void Parameters
- takeHidden:
booleanIf we should take into account the hidden columns in the pinned area.
Returns void
Example
const pinnedWidth = this.grid.getPinnedEndWidth(); getPinnedStartWidth
Section titled "getPinnedStartWidth"Gets calculated width of the pinned areas.
getPinnedStartWidth(takeHidden: boolean): void Parameters
- takeHidden:
booleanIf we should take into account the hidden columns in the pinned area.
Returns void
Example
const pinnedWidth = this.grid.getPinnedStartWidth(); getPreviousCell
Section titled "getPreviousCell"Returns ICellPosition which defines the previous cell,
according to the current position, that match specific criteria.
getPreviousCell(currRowIndex: number, curVisibleColIndex: number, callback: any): IgrCellPosition Parameters
- currRowIndex:
number - curVisibleColIndex:
number - callback:
any
Returns IgrCellPosition
Example
const previousEditableCellPosition = this.grid.getPreviousCell(0, 3, (column) => column.editable); getRowData
Section titled "getRowData"Returns the data that is contained in the row component.
getRowData(rowSelector: any): any Parameters
- rowSelector:
anycorrespond to rowID
Returns any
Example
const data = grid.getRowData(94741); getSelectedColumnsData
Section titled "getSelectedColumnsData"Returns an array of the current columns selection in the form of [{ column.field: cell.value }, ...].
getSelectedColumnsData(formatters: boolean, headers: boolean): void Parameters
- formatters:
boolean - headers:
boolean
Returns void
getSelectedData
Section titled "getSelectedData"Returns an array of the current cell selection in the form of [{ column.field: cell.value }, ...].
getSelectedData(formatters: boolean, headers: boolean): void Parameters
- formatters:
boolean - headers:
boolean
Returns void
getSelectedRanges
Section titled "getSelectedRanges"Get the currently selected ranges in the grid.
getSelectedRanges(): IgrGridSelectionRange[] Returns IgrGridSelectionRange[]
isRecordPinnedByIndex
Section titled "isRecordPinnedByIndex"Returns whether the record is pinned or not.
isRecordPinnedByIndex(rowIndex: number): void Parameters
- rowIndex:
numberIndex of the record in the
filteredSortedDatacollection.
Returns void
markForCheck
Section titled "markForCheck"Triggers change detection for the GridComponent.
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:
``
markForCheck(): void Returns void
Example
grid.markForCheck(); moveColumn
Section titled "moveColumn"Places a column before or after the specified target column.
moveColumn(column: IgrColumnComponent, target: IgrColumnComponent, pos: DropPosition): void Parameters
- column:
IgrColumnComponent - target:
IgrColumnComponent - pos:
DropPosition
Returns void
Example
grid.moveColumn(column, target); navigateTo
Section titled "navigateTo"Navigates to a position in the grid based on provided rowindex and visibleColumnIndex.
navigateTo(rowIndex: number, visibleColIndex: number, cb: any): void Parameters
- rowIndex:
number - visibleColIndex:
number - cb:
any
Returns void
Example
this.grid.navigateTo(10, 3, (args) => { args.target.nativeElement.focus(); }); openAdvancedFilteringDialog
Section titled "openAdvancedFilteringDialog"Opens the advanced filtering dialog.
openAdvancedFilteringDialog(overlaySettings: IgrOverlaySettings): void Parameters
- overlaySettings:
IgrOverlaySettings
Returns void
pinColumn
Section titled "pinColumn"Pins a column by field name.
pinColumn(columnName: string, index: number, pinningPosition: ColumnPinningPosition): boolean Parameters
- columnName:
string - index:
number - pinningPosition:
ColumnPinningPosition
Returns boolean
Example
this.grid.pinColumn("ID"); pinRow
Section titled "pinRow"Pin the row by its id.
pinRow(rowID: any, index: number, row: IgrRowType): boolean Parameters
- rowID:
anyThe row id - primaryKey value or the data record instance.
- index:
numberThe index at which to insert the row in the pinned collection.
- row:
IgrRowType
Returns boolean
Example
this.grid.pinRow(rowID); recalculateAutoSizes
Section titled "recalculateAutoSizes"Recalculates all widths of columns that have size set to auto.
recalculateAutoSizes(): void Returns void
Example
this.grid1.recalculateAutoSizes(); reflow
Section titled "reflow"Recalculates grid width/height dimensions.
reflow(): void Returns void
Example
this.grid.reflow(); refreshSearch
Section titled "refreshSearch"Reapplies the existing search.
refreshSearch(updateActiveInfo: boolean, endEdit: boolean): number Parameters
- updateActiveInfo:
boolean - endEdit:
boolean
Returns number
Example
this.grid.refreshSearch(); selectAllColumns
Section titled "selectAllColumns"Selects all columns
selectAllColumns(): void Returns void
Example
this.grid.deselectAllColumns(); selectAllRows
Section titled "selectAllRows"Selects all rows
selectAllRows(onlyFilterData: boolean): void Parameters
- onlyFilterData:
boolean
Returns void
Example
this.grid.selectAllRows();
this.grid.selectAllRows(false); selectColumns
Section titled "selectColumns"Select specified columns.
selectColumns(columns: string[] | IgrColumnComponent[], clearCurrentSelection: boolean): void Parameters
- columns:
string[] | IgrColumnComponent[] - clearCurrentSelection:
booleanif true clears the current selection
Returns void
Example
this.grid.selectColumns(['ID','Name'], true); selectedColumns
Section titled "selectedColumns"Get current selected columns.
selectedColumns(): IgrColumnComponent[] Returns IgrColumnComponent[]
Example
Returns an array with selected columns
const selectedColumns = this.grid.selectedColumns(); selectRange
Section titled "selectRange"Select range(s) of cells between certain rows and columns of the grid.
selectRange(arg: IgrGridSelectionRange[]): void Parameters
- arg:
IgrGridSelectionRange[]
Returns void
selectRows
Section titled "selectRows"Select specified rows by ID.
selectRows(rowIDs: any[], clearCurrentSelection: boolean): void Parameters
- rowIDs:
any[] - clearCurrentSelection:
booleanif true clears the current selection
Returns void
Example
this.grid.selectRows([1,2,5], true); Sort a single ColumnComponent.
sort(expression: IgrSortingExpression[]): void Parameters
- expression:
IgrSortingExpression[]
Returns void
Example
this.grid.sort({ fieldName: name, dir: SortingDirection.Asc, ignoreCase: false }); toggleColumnVisibility
Section titled "toggleColumnVisibility"Toggles the specified column's visibility.
toggleColumnVisibility(args: IgrColumnVisibilityChangedEventArgs): void Parameters
Returns void
Example
this.grid1.toggleColumnVisibility({
column: this.grid1.columns[0],
newValue: true
}); toggleRow
Section titled "toggleRow"Toggles the row by its id.
toggleRow(rowID: any): void Parameters
- rowID:
anyThe row id - primaryKey value or the data record instance.
Returns void
Example
this.grid.toggleRow(rowID); unpinColumn
Section titled "unpinColumn"Unpins a column by field name. Returns whether the operation is successful.
unpinColumn(columnName: string, index: number): boolean Parameters
- columnName:
string - index:
number
Returns boolean
Example
this.grid.pinColumn("ID"); unpinRow
Section titled "unpinRow"Unpin the row by its id.
unpinRow(rowID: any, row: IgrRowType): boolean Parameters
- rowID:
anyThe row id - primaryKey value or the data record instance.
- row:
IgrRowType
Returns boolean
Example
this.grid.unpinRow(rowID); updateCell
Section titled "updateCell"Updates the GridRowComponent and the corresponding data record by primary key.
updateCell(value: any, rowSelector: any, column: string): void Parameters
- value:
anythe new value which is to be set.
- rowSelector:
anycorresponds to rowID.
- column:
stringcorresponds to column field.
Returns void
Example
this.gridWithPK.updateCell('Updated', 1, 'ProductName'); updateRow
Section titled "updateRow"Updates the GridRowComponent
updateRow(value: any, rowSelector: any): void Parameters
- value:
any - rowSelector:
anycorrespond to rowID
Returns void
Example
grid.updateRow({
ProductID: 1, ProductName: 'Spearmint', InStock: true, UnitsInStock: 1, OrderDate: new Date('2005-03-21')
}, 1); Events
Section titled "Events"onActiveNodeChange
Section titled "onActiveNodeChange"onActiveNodeChange(args: CustomEvent<IgrActiveNodeChangeEventArgs>): void Parameters
Returns void
onAdvancedFilteringExpressionsTreeChange
Section titled "onAdvancedFilteringExpressionsTreeChange"onAdvancedFilteringExpressionsTreeChange(args: CustomEvent<IgrFilteringExpressionsTree>): void Parameters
Returns void
onCellClick
Section titled "onCellClick"onCellClick(args: CustomEvent<IgrGridCellEventArgs>): void Parameters
- args:
CustomEvent<IgrGridCellEventArgs>
Returns void
onCellEdit
Section titled "onCellEdit"onCellEdit(args: CustomEvent<IgrGridEditEventArgs>): void Parameters
- args:
CustomEvent<IgrGridEditEventArgs>
Returns void
onCellEditDone
Section titled "onCellEditDone"onCellEditDone(args: CustomEvent<IgrGridEditDoneEventArgs>): void Parameters
Returns void
onCellEditEnter
Section titled "onCellEditEnter"onCellEditEnter(args: CustomEvent<IgrGridEditEventArgs>): void Parameters
- args:
CustomEvent<IgrGridEditEventArgs>
Returns void
onCellEditExit
Section titled "onCellEditExit"onCellEditExit(args: CustomEvent<IgrGridEditDoneEventArgs>): void Parameters
Returns void
onColumnInit
Section titled "onColumnInit"onColumnInit(args: CustomEvent<IgrColumnComponent>): void Parameters
- args:
CustomEvent<IgrColumnComponent>
Returns void
onColumnMoving
Section titled "onColumnMoving"onColumnMoving(args: CustomEvent<IgrColumnMovingEventArgs>): void Parameters
Returns void
onColumnMovingEnd
Section titled "onColumnMovingEnd"onColumnMovingEnd(args: CustomEvent<IgrColumnMovingEndEventArgs>): void Parameters
Returns void
onColumnMovingStart
Section titled "onColumnMovingStart"onColumnMovingStart(args: CustomEvent<IgrColumnMovingStartEventArgs>): void Parameters
Returns void
onColumnPin
Section titled "onColumnPin"onColumnPin(args: CustomEvent<IgrPinColumnCancellableEventArgs>): void Parameters
Returns void
onColumnPinned
Section titled "onColumnPinned"onColumnPinned(args: CustomEvent<IgrPinColumnEventArgs>): void Parameters
- args:
CustomEvent<IgrPinColumnEventArgs>
Returns void
onColumnResized
Section titled "onColumnResized"onColumnResized(args: CustomEvent<IgrColumnResizeEventArgs>): void Parameters
Returns void
onColumnsAutogenerated
Section titled "onColumnsAutogenerated"onColumnsAutogenerated(args: CustomEvent<IgrColumnsAutoGeneratedEventArgs>): void Parameters
Returns void
onColumnSelectionChanging
Section titled "onColumnSelectionChanging"onColumnSelectionChanging(args: CustomEvent<IgrColumnSelectionEventArgs>): void Parameters
Returns void
onColumnVisibilityChanged
Section titled "onColumnVisibilityChanged"onColumnVisibilityChanged(args: CustomEvent<IgrColumnVisibilityChangedEventArgs>): void Parameters
Returns void
onColumnVisibilityChanging
Section titled "onColumnVisibilityChanging"onColumnVisibilityChanging(args: CustomEvent<IgrColumnVisibilityChangingEventArgs>): void Parameters
Returns void
onContextMenu
Section titled "onContextMenu"onContextMenu(args: CustomEvent<IgrGridContextMenuEventArgs>): void Parameters
Returns void
onDataChanged
Section titled "onDataChanged"onDataChanged(args: CustomEvent<IgrForOfDataChangeEventArgs>): void Parameters
Returns void
onDataChanging
Section titled "onDataChanging"onDataChanging(args: CustomEvent<IgrForOfDataChangeEventArgs>): void Parameters
Returns void
onDimensionInit
Section titled "onDimensionInit"onDimensionInit(args: CustomEvent<IgrPivotDimension>): void Parameters
- args:
CustomEvent<IgrPivotDimension>
Returns void
onDimensionsChange
Section titled "onDimensionsChange"onDimensionsChange(args: CustomEvent<IgrDimensionsChange>): void Parameters
- args:
CustomEvent<IgrDimensionsChange>
Returns void
onDimensionsSortingExpressionsChange
Section titled "onDimensionsSortingExpressionsChange"onDimensionsSortingExpressionsChange(args: CustomEvent<IgrSortingExpression[]>): void Parameters
- args:
CustomEvent<IgrSortingExpression[]>
Returns void
onDoubleClick
Section titled "onDoubleClick"onDoubleClick(args: CustomEvent<IgrGridCellEventArgs>): void Parameters
- args:
CustomEvent<IgrGridCellEventArgs>
Returns void
onExpansionStatesChange
Section titled "onExpansionStatesChange"onExpansionStatesChange(args: CustomEvent<Map<any, boolean>>): void Parameters
- args:
CustomEvent<Map<any, boolean>>
Returns void
onFiltering
Section titled "onFiltering"onFiltering(args: CustomEvent<IgrFilteringEventArgs>): void Parameters
- args:
CustomEvent<IgrFilteringEventArgs>
Returns void
onFilteringDone
Section titled "onFilteringDone"onFilteringDone(args: CustomEvent<IgrFilteringExpressionsTree>): void Parameters
Returns void
onFilteringExpressionsTreeChange
Section titled "onFilteringExpressionsTreeChange"onFilteringExpressionsTreeChange(args: CustomEvent<IgrFilteringExpressionsTree>): void Parameters
Returns void
onFormGroupCreated
Section titled "onFormGroupCreated"onFormGroupCreated(args: CustomEvent<IgrGridFormGroupCreatedEventArgs>): void Parameters
Returns void
onGridCopy
Section titled "onGridCopy"onGridCopy(args: CustomEvent<IgrGridClipboardEvent>): void Parameters
- args:
CustomEvent<IgrGridClipboardEvent>
Returns void
onGridKeydown
Section titled "onGridKeydown"onGridKeydown(args: CustomEvent<IgrGridKeydownEventArgs>): void Parameters
Returns void
onGridScroll
Section titled "onGridScroll"onGridScroll(args: CustomEvent<IgrGridScrollEventArgs>): void Parameters
Returns void
onPivotConfigurationChange
Section titled "onPivotConfigurationChange"onPivotConfigurationChange(args: CustomEvent<IgrPivotConfigurationChangedEventArgs>): void Parameters
Returns void
onRangeSelected
Section titled "onRangeSelected"onRangeSelected(args: CustomEvent<IgrGridSelectionRange>): void Parameters
- args:
CustomEvent<IgrGridSelectionRange>
Returns void
onRendered
Section titled "onRendered"onRendered(args: CustomEvent<boolean>): void Parameters
- args:
CustomEvent<boolean>
Returns void
onRowAdd
Section titled "onRowAdd"onRowAdd(args: CustomEvent<IgrRowDataCancelableEventArgs>): void Parameters
Returns void
onRowAdded
Section titled "onRowAdded"onRowAdded(args: CustomEvent<IgrRowDataEventArgs>): void Parameters
- args:
CustomEvent<IgrRowDataEventArgs>
Returns void
onRowClick
Section titled "onRowClick"onRowClick(args: CustomEvent<IgrGridRowEventArgs>): void Parameters
- args:
CustomEvent<IgrGridRowEventArgs>
Returns void
onRowDelete
Section titled "onRowDelete"onRowDelete(args: CustomEvent<IgrRowDataCancelableEventArgs>): void Parameters
Returns void
onRowDeleted
Section titled "onRowDeleted"onRowDeleted(args: CustomEvent<IgrRowDataEventArgs>): void Parameters
- args:
CustomEvent<IgrRowDataEventArgs>
Returns void
onRowDragEnd
Section titled "onRowDragEnd"onRowDragEnd(args: CustomEvent<IgrRowDragEndEventArgs>): void Parameters
Returns void
onRowDragStart
Section titled "onRowDragStart"onRowDragStart(args: CustomEvent<IgrRowDragStartEventArgs>): void Parameters
Returns void
onRowEdit
Section titled "onRowEdit"onRowEdit(args: CustomEvent<IgrGridEditEventArgs>): void Parameters
- args:
CustomEvent<IgrGridEditEventArgs>
Returns void
onRowEditDone
Section titled "onRowEditDone"onRowEditDone(args: CustomEvent<IgrGridEditDoneEventArgs>): void Parameters
Returns void
onRowEditEnter
Section titled "onRowEditEnter"onRowEditEnter(args: CustomEvent<IgrGridEditEventArgs>): void Parameters
- args:
CustomEvent<IgrGridEditEventArgs>
Returns void
onRowEditExit
Section titled "onRowEditExit"onRowEditExit(args: CustomEvent<IgrGridEditDoneEventArgs>): void Parameters
Returns void
onRowPinned
Section titled "onRowPinned"onRowPinned(args: CustomEvent<IgrPinRowEventArgs>): void Parameters
- args:
CustomEvent<IgrPinRowEventArgs>
Returns void
onRowPinning
Section titled "onRowPinning"onRowPinning(args: CustomEvent<IgrPinRowEventArgs>): void Parameters
- args:
CustomEvent<IgrPinRowEventArgs>
Returns void
onRowSelectionChanging
Section titled "onRowSelectionChanging"onRowSelectionChanging(args: CustomEvent<IgrRowSelectionEventArgs>): void Parameters
Returns void
onRowToggle
Section titled "onRowToggle"onRowToggle(args: CustomEvent<IgrRowToggleEventArgs>): void Parameters
- args:
CustomEvent<IgrRowToggleEventArgs>
Returns void
onSelected
Section titled "onSelected"onSelected(args: CustomEvent<IgrGridCellEventArgs>): void Parameters
- args:
CustomEvent<IgrGridCellEventArgs>
Returns void
onSelectedRowsChange
Section titled "onSelectedRowsChange"onSelectedRowsChange(args: CustomEvent<any[]>): void Parameters
- args:
CustomEvent<any[]>
Returns void
onSorting
Section titled "onSorting"onSorting(args: CustomEvent<IgrSortingEventArgs>): void Parameters
- args:
CustomEvent<IgrSortingEventArgs>
Returns void
onSortingDone
Section titled "onSortingDone"onSortingDone(args: CustomEvent<IgrSortingExpression[]>): void Parameters
- args:
CustomEvent<IgrSortingExpression[]>
Returns void
onSortingExpressionsChange
Section titled "onSortingExpressionsChange"onSortingExpressionsChange(args: CustomEvent<IgrSortingExpression[]>): void Parameters
- args:
CustomEvent<IgrSortingExpression[]>
Returns void
onToolbarExporting
Section titled "onToolbarExporting"onToolbarExporting(args: CustomEvent<IgrGridToolbarExportEventArgs>): void Parameters
Returns void
onValidationStatusChange
Section titled "onValidationStatusChange"onValidationStatusChange(args: CustomEvent<IgrGridValidationStatusEventArgs>): void Parameters
Returns void
onValueInit
Section titled "onValueInit"onValueInit(args: CustomEvent<IgrPivotValue>): void Parameters
- args:
CustomEvent<IgrPivotValue>
Returns void
onValuesChange
Section titled "onValuesChange"onValuesChange(args: CustomEvent<IgrValuesChange>): void Parameters
- args:
CustomEvent<IgrValuesChange>