Is it Possible to Sort Only by Clicking the Sorting Arrows
Is it Possible to Sort Only by Clicking the Sorting Arrows
Hi,
First of all - great application!
My problem is that one of my columns is a checkbox column that has a checkbox to "check all" in the heading. I would still like to be able to sort this column, but I don't want it sorting the column every time the "check all" checkbox is checked/unchecked. Is it possible to set the table so that the only way to sort columns is by clicking only the sorting arrows, and not by clicking anywhere in the heading?
Thanks,
Will
First of all - great application!
My problem is that one of my columns is a checkbox column that has a checkbox to "check all" in the heading. I would still like to be able to sort this column, but I don't want it sorting the column every time the "check all" checkbox is checked/unchecked. Is it possible to set the table so that the only way to sort columns is by clicking only the sorting arrows, and not by clicking anywhere in the heading?
Thanks,
Will
This discussion has been closed.
Replies
You could have the jQUery event cancel the bubble (stopPropagation()) which might work for you?
Or you can unbind the event listeners DataTables added to the column headers and use fnSortListener to attach listeners to custom elements (i.e. a div inside the header and you put there).
Allan
Allan