DkGridSorting

You can access this instance through the property named sorting of the DkGridComponent.

Generics

<T> represents the object's shape coming from the data source.

<R> represents the column data type: string, number, Date, or boolean.

Methods

MethodDescription

sortBy()

It sorts the DkGrid rows by the given column in the given direction.

Params:

  1. column: DkDataColumnDef<T, R>.

  2. direction: 'asc' | 'desc'

Return value: void.

isDkGridSortedBy()

It evaluates if the DkGrid is sorted by the given column.

Params:

  1. column: DkDataColumnDef<T, R>.

Return: boolean.

getCurrentSortable()

It returns the column and the direction of the sorting operation. Otherwise, it returns null.

Params: None.

Return: DkColumnSorted<T, R>.

clearSorting()

It removes the current sorting operation.

Params: None.

Return: void.

Events

EventDescription

sortChange

It emits the column and the direction of the current sorting operation.

Params: None.

Return: Observable<DkColumnSortEvent<T>.

Last updated