API calls for the flat table
Learn more about available API calls for the flat table control.
clearSort
clearSort(fieldName: String): Promise<void>
Clears the applied sorting from a specified field or all fields at once.
Parameters
Parameter/Type | Description |
---|---|
fieldNameString | Clears the applied sorting from the sorted field. If the fieldName is not specified, sorting will be cleared from all fields. |
Example
flatTable.clearSort("Score").then(()=>{
// Your functionality
});
Returns: Promise<void> - A Promise that resolves to undefined
. It is useful when working with server-side data sources to perform operations over the data asynchronously. The Promise ensures that code depending on the result of clearSort()
is run after the operation is fully completed.
getCell
getCell(rowIdx: Number, colIdx: Number): GridCellObject
Gets the cell object at the specified row and column coordinates.
Parameters
Example
flatTable.getCell(1, 2);
Returns: GridCellObject, which contains information about the cell.
scrollToColumn
scrollToColumn(columnIndex: Number)
Scrolls the grid to the specified column.
Parameters
Parameter/Type | Description |
---|---|
columnIndexNumber | The index of the column to which the grid will be scrolled. Indexes start from 0 . |
Example:
flexmonster.scrollToColumn(5);
scrollToRow
scrollToRow(rowIndex: Number)
Scrolls the grid to the specified row.
Parameters
Parameter/Type | Description |
---|---|
rowIndexNumber | The index of the row to which the grid will be scrolled. Indexes start from 0 . |
Example:
flexmonster.scrollToRow(5);
setSort
clearSort(sortParams: Object): Promise<void>
Sorts the field members in the specified order.
Parameters
Example
flatTable.setSort({
fieldName: "Score",
sortDirection: "desc"
}).then(()=>{
// Your functionality
});
Returns: Promise<void> - A Promise that resolves to undefined
. It is useful when working with server-side data sources to perform operations over the data asynchronously. The Promise ensures that code depending on the result of setSort()
is run after the operation is fully completed.