how to reset to default sort column after custom search button server side processing?
how to reset to default sort column after custom search button server side processing?
How can a sort column reset be done to default sort column after custom search button server side processing? The custom search works fine and so does click the column sort icons for server side processing. My issue is, the second-nth time I click search, it retains the last sort column values. How can I reset the column values to point to the default sort column (first column)?
I added this to the Search button click event, but the sort icon did not change:
gtblSubjectAreasdataTable.resetPaging = true;
and tried this:
gtblSubjectAreasdataTable.ajax.reload(null,true);
Answers
Did you manage to figure this out? I posted on Stack Overflow about it - https://stackoverflow.com/questions/45233383/reset-button-in-datatables-server-side-mode-to-show-the-original-table-data/45233673
All information I've found relate to people who are not using it in Server Side mode, but we are. This is a massive problem with DataTables if there's no way to do it. Please can someone who knows address this?