Thead Colspan and 1.8.0
Thead Colspan and 1.8.0
dwa
Posts: 5Questions: 0Answers: 0
I am using 1.8 and I have a problem with colspan not working in thead. I didn't have this issue with 1.7
My table looks like this-
[code]
PO Number
Creation Date
Job Name
Job Number
Supplier
Status
Created By
Actions
<?php foreach ($po_list as $po): ?>
<?= $po->id ?>
<?= $po->date ?>
<?= $po->jobName ?>
<?= $po->jobId ?>
<?= $po->supplierName ?>
<?= $po->status ?>
<?= $po->creator ?>
<?= anchor("admin/purchase_orders/edit/{$po->id}", "Edit") ?>
<?= anchor("admin/purchase_orders/delete/{$po->id}", "Delete") ?>
<?php endforeach ?>
[/code]
If I remove the colspan and add another th no errors.
I am baffled as to why this would work previously.
Thanks kindly in advance.
My table looks like this-
[code]
PO Number
Creation Date
Job Name
Job Number
Supplier
Status
Created By
Actions
<?php foreach ($po_list as $po): ?>
<?= $po->id ?>
<?= $po->date ?>
<?= $po->jobName ?>
<?= $po->jobId ?>
<?= $po->supplierName ?>
<?= $po->status ?>
<?= $po->creator ?>
<?= anchor("admin/purchase_orders/edit/{$po->id}", "Edit") ?>
<?= anchor("admin/purchase_orders/delete/{$po->id}", "Delete") ?>
<?php endforeach ?>
[/code]
If I remove the colspan and add another th no errors.
I am baffled as to why this would work previously.
Thanks kindly in advance.
This discussion has been closed.
Replies
DataTables requires one unique TH cell for each column - that's how it knows how many columns are in the table and provide sorting / filtering for each one. So I wouldn't expect the HTML above to work in any version of DataTables.
Allan
Thanks for the quick reply. You're right of course. It did alert out using 1.7.5; on the page I was working on I didn't see any errors because the last two columns had been combined where as they were not on others.
Thank you helping me find my sanity. :)