Sorting data with colspan header
Sorting data with colspan header
mrdatatable
Posts: 2Questions: 0Answers: 0
Hi,
I have a table with 9 columns. The first two columns contain a text and an icon. In the header I only want to use one titel for both, so I used colspan="2". But now, it isn't possible to sort this column. The proberty "aaSorting" is working (it looks like :)).
There are any possibilities to sort the first column?
Thx
I'm using the newest Version 1.8.2.
I have a table with 9 columns. The first two columns contain a text and an icon. In the header I only want to use one titel for both, so I used colspan="2". But now, it isn't possible to sort this column. The proberty "aaSorting" is working (it looks like :)).
There are any possibilities to sort the first column?
Thx
I'm using the newest Version 1.8.2.
This discussion has been closed.
Replies
Here is the example page that uses colspan in this way (cols 2, 3, and 4 are grouped as "Details"):
http://www.datatables.net/release-datatables/examples/basic_init/complex_header.html
Because you're trying to use this feature for a different purpose, you might have to manually attach a listener to that column in order to get the sorting working again. It should be a matter of using a function like jQuery's .click() to attach a sort listener.