Default Sort on a Certain Letter?

Default Sort on a Certain Letter?

buildakickerbuildakicker Posts: 7Questions: 1Answers: 0
edited January 2014 in DataTables 1.9
I have a table of data shown by parsing xml. I would like it to sort by default on a certain letter. Is that possible?

For example by default, regardless of how the xml has the info, I'd like the table to start with all the U words at the top.

If there is some documentation on this, that would be great... or any ideas.

Thanks
Jason

Replies

  • tangerinetangerine Posts: 3,365Questions: 39Answers: 395
    The aaSorting parameter will determine which column is to be sorted on initialisation.
    http://datatables.net/ref
  • allanallan Posts: 63,498Questions: 1Answers: 10,470 Site admin
    I think you'd need to define a sorting plug-in which would apply the exact sorting you want - http://datatables.net/development/sorting . Most plug-ins sort alphabetically, so you would need to provide the logic for your own sorting.

    Allan
  • buildakickerbuildakicker Posts: 7Questions: 1Answers: 0
    Thanks for the replies. I am looking for the sorting plug-in... i'll try and get some logic in there and make something work. Thanks Allan :)
This discussion has been closed.