Display issue using rowspan/colspan

Display issue using rowspan/colspan

mattmmattm Posts: 2Questions: 0Answers: 0
edited June 2012 in Bug reports
I have a datatable with 2 rows in the header and have bJQueryUI turned on. Col 4 is displaying using the standard datatables formatting but the rest of the datatable is displaying using the JQueryUI theme. Code is as follows:

[code]


Col 1
Col 2
Col 3
Col 4
Col 5
Col 6
Col 7


Col 4a
Col 4b



$("#projecttable").dataTable({
"bJQueryUI" : true,
"bPaginate" : false,
"bLengthChange" : false,
"bFilter" : false,
"bSort" : false,
"bInfo" : false,
"bAutoWidth" : false,
"fnDrawCallback" : function() { $("#projecttable").show(); }
});
[/code]

Any ideas what the issue is?

Replies

  • allanallan Posts: 61,903Questions: 1Answers: 10,148 Site admin
    DataTables doesn't automatically add classes to elements that is doesn't "control" - i.e. it directly controls the elements that are being used for sorting, and thus adds the required classes, but it doesn't do that for the other elements. So to get a unified look add:

    [code]
    $('thead th').addClass('ui-state-default');
    [/code]

    to your Javascript.

    Its not perfect I know, and I will get a better solution for this in future!

    Allan
  • mattmmattm Posts: 2Questions: 0Answers: 0
    Works like a charm - thanks!
This discussion has been closed.