I am using the Datatables plugin to work with some data:
My problem is that I would like to present the data in the order it is provided initially. So, disable DataTables auto sort on execution. However, I still want to provide the users the option to sort the tables themselves. bSort:false allows me to disable the initial sorting, but it also disabled the user’s ability to sort.
How can I achieve both? FYI, the data is provided in a randomized order.
The property you are looking for is “aaSorting”. Leave “bSort” as is.
You can also set individual column sorting by applying “bSortable”: True, or “bSortable”: False to each column in “aoColumns”.