Datatable sort/order
Datatable sort/order
Hello. I have some problems. I have 2 datatables with different data. One of them about invoices and the other one about tracking.
In the first one, invoices, I sort them using ORDER BY in the query and it works perfectly. But i just copy and change labels an select data from the query and it doesn't works.. I use buttons plugins too.
Well, at the beginning Datatable works by 1 second but when buttons load it goes back to sort by the first column.
Anyone knows what's happening?
And sorry for my english..
Answers
Depending on your configuration sorting can happen at the server or the client. If your sorting is at the client then the SQL queries sorting will be changed by Datatables.
Sorry I'm not clear on what your code is doing to offer help.
There are many configuration options that can affect how sorting works. Without seeing what you have its near impossible to tell you what the problem is. Please post a link to your page or a test case replicating the issue so we can help debug.
https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case
Kevin