Deleting row doesn`t affect background data!
Deleting row doesn`t affect background data!
Luda Ameba
Posts: 11Questions: 0Answers: 0
Hi,
I have problem, when using fnDeleteRow. It clears the html row but when I call fnGetData the row is still there. If you print length of tableData it won`t decrease after fnDeleteRow function is called. :)
I am using dynamically adding and removing rows.
I have problem, when using fnDeleteRow. It clears the html row but when I call fnGetData the row is still there. If you print length of tableData it won`t decrease after fnDeleteRow function is called. :)
I am using dynamically adding and removing rows.
This discussion has been closed.
Replies
You are quite correctly in this. The reason for this is the the information about the row is deleted from the display arrays, but not the core data array. I do it this way because there are a number of internal and external utilities which depend on the indexing of the core data array (fnGetPosition for example). As such this isn't all that trivial to fix. I'll need to get back to you on this one... :-)
Allan
http://naspinski.net/post/Deleting-Items-From-a-Table--REAL-AJAX-with-AspNet-Series.aspx
It is with asp.net, but the JS is the same regardless
@naspinski
Good example but in my case table data are in local not on server side until I send them :)