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: 54,578Questions: 1Answers: 8,533 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: 13,620Questions: 25Answers: 3,204

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

    Kevin

Sign In or Register to comment.