No sort by default
No sort by default
Hy all,
I have a new problem. I would like no sort by default. Here, it's the first column who are sort but I can't find a solution for no sort but I want to keep the possibility to sort my columns after :)
Is it possible ?
Thank you
I have a new problem. I would like no sort by default. Here, it's the first column who are sort but I can't find a solution for no sort but I want to keep the possibility to sort my columns after :)
Is it possible ?
Thank you
This discussion has been closed.
Replies
Please see this thread: http://datatables.net/forums/comments.php?DiscussionID=1121
Allan
I see this option "aaSorting" but unless I am mistaken, I need to put asc or desc but no "null". So one of my column must be sorted whereas I want no sort on no colum at the pre initalisation.
Maybe I misunderstood...
Thank you for your help !
To have no sort by default (other than the original table order), but to keep sorting enabled, such that the end user can click the column titles, you just need to set aaSorting to be an empty array. If you wanted the second column to be sorted initially then you could set aaSorting to be [[1,'asc']], for example.
Regards,
Allan
I didn't think an empty array could work.
Thanks a lot and congratulations for your script.