4 Replies Latest reply on May 20, 2008 2:29 AM by kchamarthi

    Finding out if any modifications are being made in the fields in an editable datagrid

    kchamarthi
      Hi,
      I populated my data grid with an array collection(initDG=event.result.categorydtls.category) where initDGObject is the array collection.I made the data grid as editable.Now , when the user click's on submit(below data grid), the request for modifying the corresponding details in database should go only if the user makes any modification ,or else an alert should be shown saying that "you havent made any modifications".For this purpose i assigned "event.result.categorydtls.category" to another array collection initDGObject and ,in the function which will be invoked after clicking on submit i compared both the objects initDG and initDGObject.But to my surprise,if any field in data grid is modified then both initDG and intiDGObject(here let me remind that i assigned initDG as the data provider for grid and initDGObject is a normal array collection object for which the details are assigned to for comparison purpose) are also modifying.So i am unable to check if any modifications are being made before forwarding request for database modification to back end.Please suggest me a solution for doing this task.Thanks in advance.