Two DataTables on Sort Control
Two DataTables on Sort Control
I am currently using two datatables and I would like that when I sort one it applies the same sort to the other, IE table1.col1 sort asc triggers table2.col1 sort asc
I would also like to know how to remove the header as I will only need one.
Thank you ahead of time.
I would also like to know how to remove the header as I will only need one.
Thank you ahead of time.
This discussion has been closed.
Replies
What you would do is unbind the sorting event handlers DataTables puts on the headers, and then you would put your own on them which will sort both tables.
Regarding the header removal - DataTables rather expects it to be there - so this would be unsupported behaviour. But what I think you could do is just removeChild() on the THEAD (to remove the TR) once the table has been fully initialised. But never tried it... :-)
Allan
This sounds perfect. I will wait for official release
fnUpdate is used to update data to the table, rather than as a callback.
Allan