Set active sort column without actually sorting data?

Set active sort column without actually sorting data?

deathtospamdeathtospam Posts: 10Questions: 0Answers: 0
edited September 2012 in General
Is there a way to explicitly set the state of a single column's TH cell, without actually sorting the underlying table data? I'm doing server-side processing: SQL takes care of sorting the data, after which I set the "aaData" property to render in the proper order. The problem is that I need to set the dataTable header to match the column SQL is sorting on, and the visible table data doesn't match the hidden data.

I was hoping I could do something like set the value of "asSorting" (e.g. [2, "desc"]), but which only affects the visible header CSS styles and does -NOT- actually sort the table data. I hope that makes sense...

Replies

  • deathtospamdeathtospam Posts: 10Questions: 0Answers: 0
    edited September 2012
    It's ok to delete or close this discussion... it was an edge case at best.
  • allanallan Posts: 63,535Questions: 1Answers: 10,475 Site admin
    You'd most likely need to use fnDrawCallback to manipulate the header classes if you wanted to effectively override the classes that DataTables assigns (which it sounds like you want to here).

    Allan
This discussion has been closed.