Delete Row that is not visible (because it's on a different page)
Delete Row that is not visible (because it's on a different page)
I have a dynamic table in which events occur that require rows that may not be visible to be deleted. Let's say I have a certain row with an ID=5, (e.g. ...) and it happens to be on another page.
Well, it doesn't exist yet in the DOM, so how on earth would I remove it from the table? I tried to store the positions of any dynamically added rows in a hashmap, but whenever I delete a row it ruins all the original positions, so I can't use fnDeleteRow(pos);
Any ideas??
Well, it doesn't exist yet in the DOM, so how on earth would I remove it from the table? I tried to store the positions of any dynamically added rows in a hashmap, but whenever I delete a row it ruins all the original positions, so I can't use fnDeleteRow(pos);
Any ideas??
This discussion has been closed.
Replies
[code]
oTable.fnDeleteRow( $('#whatever_id', oTable.fnGetNodes())[0] );
[/code]
fnGetNodes will just return an array of all TR elements in the table (including hidden ones) which you can pass to jQuery and do the selector thing on it. And that should do the trick :-)
Regards,
Allan