Best way to add a second column sort

Hello,

I have a datatable with some freeze columns can be sorted by user.
Example column sortable by users:

  • Name
  • Group

One column is displayed (Type) in freeze section but can’t be sortable.

I want when a user click on Name to sort, the executed sort is by Name and Type.
When the user click on Group, the executed sort is by Group and Type.

Regards

Note: My current implementation is by custom sort for each column.

You can use onHeaderClick event from which you can call .sort commands with a custom sorting function.

http://docs.webix.com/api__link__ui.treetable_onheaderclick_event.html
http://docs.webix.com/datatable__sorting.html#customsortingfunctions

Custom sorting function can compare values for two or more columns, which allows to organize sorting by two columns, as necessary in your case.

Thanks. I have modified my code.