Unsorted default view
Unsorted default view
I have a table in html page. To make it sortable and searchable I added:
$(document).ready(function() { $('#maintable').DataTable( { "paging": false, "info": false } ); } );It works fine except the default view comes with rows sorted by the first column.
I generate the table in certain order which I want to see on the default view and restore by clicking on Refresh icon.
How can i get the default view (when the html page shows up the first time) unsorted?
I would really appreciate simple solution and plain English explanation as I have no experience in this area.
(I was thinking of creating a fake first column with numbers 1, 2, ... and may be making it hidden, but an pretty sure there is a better solution)
Thanks
Replies
Hi @ChTree ,
Just add an empty
order
, it'll do the trick:Cheers,
Colin
Thanks, Colin