I have a databable which uses ajax to load data from server. The data is not sorted at the server. I want to get datatable sorted on one column by default when it’s displayed.
Say I have the “siteId” property in my data model, and want the datatable to be sorted on the property when it’s displayed.
So I add the onAfterLoad function and try the following in the function:
// this.sort(“siteId”);
this.sort("#siteId#");
this.markSorting(“siteId”, “asc”);
Yeah, I get the sorted mark on the column, but the data is not actually sorted.
What else do I need to add to get this to work?