Custom sorting and AJAX

Custom sorting and AJAX

bearbear Posts: 0Questions: 0Answers: 0
edited August 2013 in General
Hello everyone. I want to thank Allan for this wonderful plugin. It's a fantastic piece of software and it has been extremely useful .

After changing my implementation to use Ajax (via fnServerData, $.ajax for loading the data, and a call to fnReloadAjax when the data should reload), I've found my custom sorting functions don't seem to work properly. I've defined my custom sort functions using jQuery.fn.dataTableExt.oSort and defined the 'sType' for each column during initialization. However, the custom sort I have defined is not applied. The data is loaded correctly, my custom fnHeaderCallback works, but my columns aren't being sorted correctly. Before using Ajax, the custom sort was applied correctly (when the pages were fully reloaded after a form was submitted). Now, however, my custom sort functions are not applied to the columns. How can I force my datatable to use my custom sorting functions? What might be the cause of this? I've looked here to no avail:

http://www.datatables.net/forums/discussion/8730/cannot-custom-sort-with-ajax-data/p1

Thank you for your help.
This discussion has been closed.