Ordering data: leave them as they come?
Ordering data: leave them as they come?
It seems that data get ordered by the first visible column unless I specify something in "order". Is it possible to just display the data as they come, as default, without immediately sorting?
Otherwise I'd have to deal with an invisible column - the data in my case come from a UNION with 2 SELECTs and a "sort" column that contains 1 and 2, so that the results of the first select come first. I couldn't figure out how to make Datatables sort the data after that first column "sort" that of course doesn't get displayed.
This question has an accepted answers - jump to answer
Answers
Yep, just set
ordering
to false, see example here: http://live.datatables.net/peyatijo/1/editColin
Use
"order": []
, as shown in theorder
docs,, to show the table in the order received.Kevin
ah great, thank you!!