infringer
unread,Oct 22, 2010, 9:52:24 AM10/22/10Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to MyTableGrid
I just discovered that after a save is performed. The table's
modifiedRows, deletedRows and newRowsAdded are not reset.
So each time a save is performed after that, those same rows get sent
for processing again. For "modifiedRows" i guess this is ok, but not
how it should act.
For newRowsAdded though, it could wreak some havoc on particular
tables, inserting the same row multiple times, if someone is
performing multiple saves.
My suggestion:
in tablegrid.js there is a function "clear" that is not being used,
that blanks the modifiedRows array.
Add the following 2 lines to the clear function.
this.deletedRows = [];
this.newRowsAdded = [];
then inside the render function, where the "save" button processing is
performed.
right after the if statement for "if (self.options.toolbar.onSave)
{ .... }" add:
self.clear();
-David