Row that is added directly to the DOM via Ajax gets deleted when fnAdjustColumnSizing is called
Row that is added directly to the DOM via Ajax gets deleted when fnAdjustColumnSizing is called
wertzui
Posts: 1Questions: 1Answers: 0
I have a ASP MVC Ajax link, that adds a tr to the tbody element of the table.
1. The dataTable does not seem to notice this as the empty-message is still shown.
2. When i call fnAdjustColumnSizing the newly added tr gets removed from the dom.
How can i tell the dataTable that a new row has been added to the dom and make it recognize it as valid row?
This discussion has been closed.
Answers
You should use the DataTable API - rows.add() - to add the row, then the DataTable will know it's there, and show it after redraws etc.