How To Set A Default Column To Sort On Page Load

How To Set A Default Column To Sort On Page Load

dobulet302dobulet302 Posts: 38Questions: 0Answers: 0
edited October 2010 in General
I have gone through all the examples and I can't figure out how to set a default column to sort by. I would like to have the second column to be sorted in Desc order by default.

I have tried this but it doesn't work. I have a total of 7 column.

{ "asSorting": [ "desc", "asc", "asc" ], "aTargets": [ 2 ] },

Replies

  • allanallan Posts: 61,743Questions: 1Answers: 10,111 Site admin
    aaSorting allow the default sort to be set: http://datatables.net/usage/options#aaSorting

    Allan
This discussion has been closed.