FlexGrid- Default Sorts

Posted by: mark on 2 March 2018, 12:54 pm EST

  • Posted 2 March 2018, 12:54 pm EST

    Is it possible to declaratively specify a column that will be sorted by default? As in, the column is sorted as soon as the page loads, the user doesn’t need to interact with it.

    Furthermore, does Wijmo FlexGrid support sorting by more than one column? I’d like the default sort to be by two columns, a primary sort and then a secondary sort.

    Thanks.

  • Posted 5 March 2018, 6:06 am EST

    Hi ,

    Please refer to this sample

    http://demos.wijmo.com/5/SampleExplorer/SampleExplorer/Sample/SortingGroupingUI

    Yes FlexGrid supports primary and secondary sort. The example illustrates both.

  • Posted 8 March 2018, 10:41 am EST

    Thanks for the response. Can you point me at the right file? Or better yet just post a small code example in your answer itself?

    That example has a ton of stuff built on top of the grid. I’m looking for an out-of-the-box way to declaratively (in the HTML) specify a default sort.

  • Posted 9 March 2018, 2:05 am EST

    Here’s a simpler demo

    http://jsfiddle.net/svkbggze/

  • Posted 13 March 2018, 10:43 am EST

    Thanks, but that’s not a declarative sort. It requires writing a whole bunch of code, which is what I ideally wanted to avoid.

  • Posted 14 March 2018, 6:11 am EST

    declarativeSort.zip

    I have created Directive inorder to make it generic. Let me know if this works for you.

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels