You can access this instance through the property named sorting of the DkGridComponent.
<T> represents the object's shape coming from the data source.
<T>
<R> represents the column data type: string, number, Date, or boolean.
<R>
string
number
Date
boolean
sortBy()
It sorts the DkGrid rows by the given column in the given direction.
Params:
column: DkDataColumnDef<T, R>.
DkDataColumnDef<T, R>
direction: 'asc' | 'desc'
'asc'
'desc'
Return value: void.
isDkGridSortedBy()
It evaluates if the DkGrid is sorted by the given column.
Return: boolean.
getCurrentSortable()
It returns the column and the direction of the sorting operation. Otherwise, it returns null.
Params: None.
Return: DkColumnSorted<T, R>.
DkColumnSorted<T, R>
clearSorting()
It removes the current sorting operation.
Return: void.
void
sortChange
It emits the column and the direction of the current sorting operation.
Return: Observable<DkColumnSortEvent<T>.
Observable<DkColumnSortEvent<T>
Last updated 3 years ago