2 levels of sorting

Hi all,



I’m working on the standard Grid and it mainly gives me more than i really need. But this time i cant seem to figure out my next request.



I need to be able to sort using to levels; for example first by one column then by another column keeping the first already sorted!



Is this possible? if so what changes should i do to ensure it working?



Regards

Nick

In case of pro version it possible by using custom sorting ( sample attached )

In case of standard version you can use similar approach ( but it will require some code modification, because custom sorting functions not supported in this edition )
or you can try to enable
    grid.enableStableSorting(true)
and use sortRows for necessary columns
    grid.sortRows(1,“str”,“asc”)
    grid.sortRows(0,“str”,“asc”)

in result grid will be sorted by second column and after that by first column, if value of first column are equal, previous sorting order will be preserved - so in result it will look the same as sorting by two columns.

grid_sort_two_columns.zip (1.73 KB)