table.row.add insert into

table.row.add insert into

kiwiskiwis Posts: 15Questions: 10Answers: 0

I've been using the row.add function to add body rows into my table.


Is there a way I can add in <thead> rows?


  • allanallan Posts: 56,459Questions: 1Answers: 8,959 Site admin

    Not via the DataTables API. You need to modify the thead using jQuery / DOM methods before your initialise the DataTable.


  • kiwiskiwis Posts: 15Questions: 10Answers: 0

    The problem is the content for the thead tags are coming from my fetch Json data as well as my tbody rows.

    I'm retrieving a multi dimensional array, the first array is the header, the second is also an array but will be the rows.

  • kthorngrenkthorngren Posts: 16,424Questions: 25Answers: 3,897

    See this faq. Here is an example:


This discussion has been closed.