Error with column headers that use rowspan
Error with column headers that use rowspan
phenderson
Posts: 2Questions: 0Answers: 0
I have a header section with 2 rows for the column headers. Getting an error "Warning - columns do not match".
Here's basically what I have:
[code]
Details
Edit
Cancel
Create Date
Survey Name
Valid Period
Participants
Active
Maximum
{image}
{image}
{image}
07/01/2009
Example text
June to July
2
100
[/code]
It renders the table correctly, but I get that error message, and then it redraws the table without the "Participants" header row. Are multi-row column headers supoprted?
Thanks.
Here's basically what I have:
[code]
Details
Edit
Cancel
Create Date
Survey Name
Valid Period
Participants
Active
Maximum
{image}
{image}
{image}
07/01/2009
Example text
June to July
2
100
[/code]
It renders the table correctly, but I get that error message, and then it redraws the table without the "Participants" header row. Are multi-row column headers supoprted?
Thanks.
This discussion has been closed.
Replies
Good one! Yes rowspan and colspan are supported in the thead (they aren't in the table body), but there much be one unique cell for each column (allowing for rowspan) - see this demo for an example: http://datatables.net/1.5-beta/examples/advanced_init/complex_header.html . Your table matches this criterion and thus should work.
I've just tried your example table, and it works no problem using DataTables 1.5 beta 10. Are you using this latest version? Note that it won't work at all in DataTables 1.4 as support for this has only been added in the 1.5 beta series.
Hope this helps!
Allan