How to turn off sorting temporarily?

How to turn off sorting temporarily?

cskwgcskwg Posts: 4Questions: 2Answers: 0

I'm trying to switch off sorting for a data table (with an ajaxSource) temporarily.
Other dataTables functions, like pagination or searching I could disable easily, by hiding the appropriate elements.
But hiding the table header (although this works) is no option, because it would leave the users without orientation.
It is important, that the normal behavior can be restored after finishing the blocking task.

Answers

  • xtlcxtlc Posts: 17Questions: 2Answers: 0

    This is done here: http://live.datatables.net/rebopozu/1/edit
    And there is a second thread to this: https://datatables.net/forums/discussion/61597/disable-enable-sort-button#latest or do you mean something else?

  • cskwgcskwg Posts: 4Questions: 2Answers: 0

    Thank you very much for these very interesting answers! They provide better insight into the API. I'm currently using a different solution:
    CSS: .thead_disabler { width: 40000px; height: 44px; position: absolute; z-index: 9999; visibility: hidden; }
    HTML: div id="thead_disabler" class="thead_disabler"></div>
    Then, by using JavaScript, the disabler is made visible to overlay and so block the header. I like this solution, because of its minimal interference.

This discussion has been closed.