Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
mikke-alekstra opened this issue Mar 5, 2021 · 2 comments

Comments

@mikke-alekstra
Copy link

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!

@Ansku
Copy link
Member

Ansku commented May 20, 2021

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

@mikke-alekstra
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants