Complex headers (column grouping) and sorting issue
Complex headers (column grouping) and sorting issue
I have a table where I handle column grouping a little differently from the complex header example. In the example, TH elements that do not belong to a group are given a rowspan, but I have avoided that for aesthetic reasons. The thead looks something like this:
[code]
Group
Column 1
Column 2
Column 3
Column 4
Column 5
[/code]
In the resulting data table, sorting works fine everywhere except Column 5. Column 5 lacks the sorting classes, which are instead applied to the empty cell in the row above it.
Any thoughts on how I might work around this? Thanks.
[code]
Group
Column 1
Column 2
Column 3
Column 4
Column 5
[/code]
In the resulting data table, sorting works fine everywhere except Column 5. Column 5 lacks the sorting classes, which are instead applied to the empty cell in the row above it.
Any thoughts on how I might work around this? Thanks.
This discussion has been closed.
Replies
1. Swap the two TH elements for column 5 after DataTables has initialised
2. Modify the DataTables core to take the last element for the column (probably not to hard - in the function _fnGetUniqueThs ).
Allan
Regards,
Allan