Disable all sorting of columns after init?

Disable all sorting of columns after init?

n2losen2lose Posts: 12Questions: 3Answers: 0

Hi,

What is the best way to disable/enable sorting of columns after init?
I think we can use jQuery to remove icons sorting on the header and prevent clicking!
Then to enable these, we have to add them back.
But I would like know if we have any options, method or plugin to do that instead of?

Thanks,
Lam

This question has an accepted answers - jump to answer

Answers

  • n2losen2lose Posts: 12Questions: 3Answers: 0

    Hi @colin ,
    Do you know have any ideas? Thanks

  • colincolin Posts: 15,237Questions: 1Answers: 2,598
    Answer ✓

    Hi @n2lose ,

    There isn't an easy way unfortunately, you can only do it on initialisation. You could re-initialise the table with destroy and ordering, but other than that, yep, you would have to add/remove the icons or listeners.

    Cheers,

    Colin

  • rkvrkv Posts: 1Questions: 0Answers: 0

    how to remove sorting listener in my table?..
    table id: example
    Pls reply

  • colincolin Posts: 15,237Questions: 1Answers: 2,598

    You can disable ordering with ordering,

    Colin

This discussion has been closed.