Adding a new row to the table using DOM elements (can't use fnData w/ string array)
Adding a new row to the table using DOM elements (can't use fnData w/ string array)
kaseykrehbiel
Posts: 18Questions: 2Answers: 0
I tried:
table.fnDestroy(); // supposed to return the table DOM to its original format
$("table").append(tablerow); // tablerow = col1col2
table.fnDraw() // supposed to redraw the table
Seems like if you destroy the table, then append standard DOM to the table, then draw the table again, it should work, right? It doesn't.
Do I have to reinitialize the whole table? Is there a better way to do this? I absolutely have to be able to add to the table by adding DOM, e.g. col1col2. I cannot pass a string array into fnAddData.
table.fnDestroy(); // supposed to return the table DOM to its original format
$("table").append(tablerow); // tablerow = col1col2
table.fnDraw() // supposed to redraw the table
Seems like if you destroy the table, then append standard DOM to the table, then draw the table again, it should work, right? It doesn't.
Do I have to reinitialize the whole table? Is there a better way to do this? I absolutely have to be able to add to the table by adding DOM, e.g. col1col2. I cannot pass a string array into fnAddData.
This discussion has been closed.
Replies
Allan