Need to define default column that is sorted

Need to define default column that is sorted

lwoodslwoods Posts: 11Questions: 0Answers: 0
edited July 2010 in General
I am loading my datatable with data that is ordered in different ways. I notice that the datatable alsways initially sorts the table on column 1. Sometimes I will be loading the table with data that is sorted on column 2, for example, and I want the data to stay in that order initially. Is there an option that defines which column is initially sorted?

Thanks

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Yes there is: http://datatables.net/usage/options#aaSorting

    Allan
This discussion has been closed.