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.

h.row.add($(rowHtml2)).draw();

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

Answers

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin

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

    Allan

  • 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: 21,334Questions: 26Answers: 4,951

    See this faq. Here is an example:
    http://live.datatables.net/huyexejo/1/edit

    Kevin

This discussion has been closed.