framework icon indicating copy to clipboard operation
framework copied to clipboard

Feature request: Capability to set initial sort direction for Grid column

Open mikke-alekstra opened this issue 4 years ago • 2 comments

It would be useful to be able to customize the initial sort direction for a grid column.

Now - as far as I know - when user clicks on the grid header column, data is always sorted initially ascending. If the grid is representing for example monetary data a typical use scenario for sorting is to see the biggest numbers on the top of the list. This would require a descending initial sort direction for the column.

Cheers!

mikke-alekstra avatar Mar 05 '21 08:03 mikke-alekstra

Sorry, had somehow missed this question. You can give Grid columns initial sort direction with e.g. grid.sort(column, SortDirection.DESCENDING);

Ansku avatar May 20 '21 14:05 Ansku

I did not mean to programatically sort the grid. When user clicks on the grid header - as far as I know - sort direction is then first always ascending. The question was to have the list sorted descending at first click. As far as I know this is not possible.

mikke-alekstra avatar May 20 '21 14:05 mikke-alekstra