Yet another colspan issue...
Yet another colspan issue...
Gremlyn1
Posts: 14Questions: 0Answers: 0
At least it isn't a big one! :) I'm on to my third site using dataTables now, btw, and I still love it!
I have a table that has 4 cells, and 5 columns of data under those, the last is set to colspan=2. The table works just fine when there is data in it, but when I have no data in the table the "No matching records found" message only spans 4 columns total, not 5.
Again, not a big deal, but I'm a perfectionist like that ;) I assume it's a counting function somewhere that needs to be modified a little.
I have a table that has 4 cells, and 5 columns of data under those, the last is set to colspan=2. The table works just fine when there is data in it, but when I have no data in the table the "No matching records found" message only spans 4 columns total, not 5.
Again, not a big deal, but I'm a perfectionist like that ;) I assume it's a counting function somewhere that needs to be modified a little.
This discussion has been closed.
Replies
Actually this is intentional. In DataTables each column (in this case you have 5) needs a 'unique' TH element (this can span multiple rows, but cannot span multiple columns) in order for it to be registered as a column. Otherwise how can you activate sorting on that specific column? I think due to the complexities involved in what would be needed to fix this (questions such as, are there 4 or 5 filtering columns, would need to be answered) this is unlikely to be addressed in the near future.
One way around it is to have two rows, and ensure that each column has a unique TH element: http://datatables.net/examples/advanced_init/complex_header.html
Regards,
Allan