Thead Colspan and 1.8.0

Thead Colspan and 1.8.0

dwadwa Posts: 5Questions: 0Answers: 0
edited June 2011 in DataTables 1.8
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.

Replies

  • allanallan Posts: 63,678Questions: 1Answers: 10,497 Site admin
    I'm baffled as to why this would have worked in 1.7 as well - it should have alert()ed an error about the TD count not being what it expected. I know that worked as I hit it a few times myself!

    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
  • dwadwa Posts: 5Questions: 0Answers: 0
    Hi 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. :)
This discussion has been closed.