Bugs with dynamic tables
Bugs with dynamic tables

I'm trying to use dataTables on a table that I manipulate dynamically via javascript; i.e., I add and remove rows based on user input. dataTables with all default options causes some bizarre behavior, including:
If I add a row, and do not re-call dataTables, when I click a column header to sort, only the original rows appear; the added row is lost.
If I add a row and then DO re-call dataTables, when I click a column header to sort, ALL rows except one are lost. I think only the last row in the table is kept.
If I dynamically apply a style to a row, then remove it, then sort, the style is automagically reapplied, even though I only call dataTables on document.ready, before the style was even applied.
It's a nice tool, but the app I'm working on does a lot of row manipulation. Am I just misusing it?
If I add a row, and do not re-call dataTables, when I click a column header to sort, only the original rows appear; the added row is lost.
If I add a row and then DO re-call dataTables, when I click a column header to sort, ALL rows except one are lost. I think only the last row in the table is kept.
If I dynamically apply a style to a row, then remove it, then sort, the style is automagically reapplied, even though I only call dataTables on document.ready, before the style was even applied.
It's a nice tool, but the app I'm working on does a lot of row manipulation. Am I just misusing it?
This discussion has been closed.