Row Selected Count
Row Selected Count
flies
Posts: 35Questions: 0Answers: 0
First of all I would like to say that I am really impressed with your work.
Secondly, today I ran into a slight problem. I was using your getselected function from one of the examples, and the problem is, when i delete row and then count the selected rows i get the same amount. There is a very easy solution to this, just removeClass after deleting.
Hope it will help someone, or maybe you will make a seperate array for deleted rows instead of aoData?
Secondly, today I ran into a slight problem. I was using your getselected function from one of the examples, and the problem is, when i delete row and then count the selected rows i get the same amount. There is a very easy solution to this, just removeClass after deleting.
Hope it will help someone, or maybe you will make a seperate array for deleted rows instead of aoData?
This discussion has been closed.
Replies
What you can do (in DataTables 1.5) is pass a third argument to fnDeleteRow(), which is boolean and if true it will set the value of the internal data array to null for that column.
The reason the data is retained normally is that with the the internal data array of DataTables the position is very important, so the rows can't just be deleted from the array (fnGetPosition() etc also require those the array indexes to be maintained). However with this new third parameter you can at least go some distance to being able to see what has been deleted (do a loop looking for != null).
Hope this helps,
Allan
Regards,
Allan