Sort on startup, and javascript sort

Sort on startup, and javascript sort

relipserelipse Posts: 10Questions: 0Answers: 0
edited May 2013 in DataTables 1.9
How can I sort my datatable as soon as it is loaded and also how do i use javascript to tell it to sort.
The implementation is adding rows, my boss wants the last edited item to be on the top.
Jim

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Use aaSorting for initial sort and fnSort to perform a sort.

    Allan
  • relipserelipse Posts: 10Questions: 0Answers: 0
    Thanks Allan, aaSorting worked good, one comment - it would be nice to specify the column key instead of the index (in case i switch orders around)
This discussion has been closed.