Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by chall satya on May 14, 2007 18:10
open dhtmlx forum
dhtmlXGridObject

Hi we are using your dhtmlPRO version.Please help me out regarding the following.

How can i copy selected rows from one dhtmlGrid to the another different grid which is in the other Page. Here in my case data format in both the grids are different. Here the user can select the data from first gird many times.So once the selected data is ready in the 2nd grid he can delete some rows and finally i want to store the data from the 2nd grid in server side.Please help me out.

regards
satya.challa
Answer posted on May 14, 2007 19:19
1. To copy rows between grid you can use
    grid.moveRowTo(srowId,trowId,mode,dropmode,sourceGrid,targetGrid);
if grid structures are different - you will need to redefine functiond
    grid.gridToGrid(
which controls how data from one grid transformed into data for another grid.

>>i want to store the data from the 2nd grid in server side
2. You can save data by
a) By using dataProcessor library, this way for each action in tree (
adding/deleting/editing) related event handler generate AJAX call to
server side. There are no ready to use sample for Java but guide
describes which vars sent to server for each type of call. You only need
to implement the correct DB updates for specified AJAX calls.
    samples/savedata_grid.html

b) By serialization. The dhtmlxGrid can be serialized back to XML and
sent to server ( the sending routine is not implemented in grid and must
be implemented manually ), where XML can be parsed, data extracted and
DB updated.
    samples/pro_serialize.html

c) form integration - grid can integrates in surrounding <form> tag and
include all ( changed ) values in form scope on submit. This functionality
available starting from dhtmlxGrid 1.3
    samples/pro_form.html

Answer posted by Darya (Support) on Nov 30, 2014 05:37

Having solved the problem mentioned above, you may also look through the possible related problems with gratt chart and combobox in ajax.