SimpleTableDataProvider Class

Deprecated  in 3.5. Use the Table component in @itwin/itwinui-react instead, which does not use this class.

A Table Data Provider using an array of items.

Implements

Methods

Name Description
constructor(columns: ColumnDescription[]): SimpleTableDataProvider    
addRow(rowItem: RowItem): number Adds a row to the end  
applyFilterDescriptors(filterDescriptors: CompositeFilterDescriptorCollection): Promise<void> Apply a filter descriptor collection  
deleteRow(rowItem: RowItem, raiseRowsChangedEvent: boolean = true): void Deletes a row  
getColumns(): Promise<ColumnDescription[]> Retrieves the column descriptions  
getDistinctValues(columnKey: string, maximumValueCount?: number): Promise<DistinctValueCollection> Gets distinct values in a column  
getRow(rowIndex: number, unfiltered?: boolean): Promise<RowItem> Retrieves a specific row by index  
getRowsCount(): Promise<number> Retrieves the row count  
insertRow(rowItem: RowItem, index: number): number Inserts a row at a given row index  
moveRow(rowItem: RowItem, newIndex: number): number Moves a row to a new row index  
setItems(items: RowItem[]): void Sets the row items based on an array  
sort(columnIndex: number, sortDirection: SortDirection): Promise<void> Sorts the rows based on the value in a specific column  

Properties

Name Type Description
onColumnsChanged TableDataChangeEvent Event emitted by the data provider when column data changes  
onRowsChanged TableDataChangeEvent Event emitted by the data provider when row data changes  

Defined in

Last Updated: 20 June, 2023