Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Richard White on Feb 15, 2008 13:43
open dhtmlx forum
copy grid

hi, is there anyway to copy a grid. i want to create a replica hidden grid so that i can check whether they are the same when the user makes a change.

this way i will be bale to detect whether a change has occured in the grid and will be able to prompt the user to save. but i was just wondering whether there was a quick way to setup the hidden grid.

for example hiddengrid = viewablegrid

thanks

Answer posted by Support on Feb 15, 2008 16:08
Basically you can use something similar to

    secondgrid.loadXMLString(firstgrid.serialize())

but grid has built in monitoring which detect data changes, you can just call
    grid.getChangedRows()
to get IDs of rows where data was changed.
Answer posted by richard white on Feb 15, 2008 16:48
oh i didnt realise that ok thanks very much.

your around late tonight :) i wasnt expecting a reply until monday! thanks again very much