Colum Sort State

Colum Sort State

bsandersbsanders Posts: 2Questions: 0Answers: 0
edited July 2012 in General
I'm new to DataTables. I'm trying to find out if there is a way to get the state of the column's sort, for example, is the column sorted ascending or descending right at this moment? Where and how do I "get" that value out of the table?

Replies

  • allanallan Posts: 63,535Questions: 1Answers: 10,475 Site admin
    You could use:

    [code]
    table.fnSettings().aaSorting
    [/code]

    to get the table's current sort state. Then a function could be built up around that to tell you what the sort state of a given column is - sounds like an ideal case for a plug-in :-)

    Allan
  • bsandersbsanders Posts: 2Questions: 0Answers: 0
    Thanks, I'll look into it :)
This discussion has been closed.