PDA

View Full Version : datapath update rollback possible


qman
10-09-2005, 01:27 PM
hi

i have a grid which list all data from a table, i want to open a record in the list, edit and update the data. the updated record is sent to the server which does some validation checks (e.g. duplicate name) before updating the database. when the checkes fail, the database is not updated, however the datapath of the grid has already updated and i need to reload the list to get back. i wonder if there is an easy way to "rollback" the changes in the datapath?

thanks

bfagan
10-10-2005, 08:43 AM
I would do a cloneNode(true) on the selected row's respective datapath and put the returned lzDataElement into a 'tempRow' attribute on the grid. Then if your update fails, you can copy the values out of the lzDataElement stored in the 'tempRow' attribute back into dataset used by the grid.

qman
10-11-2005, 03:15 PM
hi

this works just fine. thank you for your help!