Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Buck Powell on Jun 03, 2008 07:07
open dhtmlx forum
Saving Grids

I have been trying to figure out a way to save my grids without the dataprocessor. It has been suggested to use a POST or GET method in a form. I used the example posted on your site and looked at the code. There is a form surrounding the table. I tried that but the POST returns an empty array.

What other ways of saving grids is available in the standard version? I am not changing any data in the grids, I am simply moving rows from one grid to another. I have 3 grids.


Thanks
Answer posted by Support on Jun 03, 2008 09:26
>>There is a form surrounding the table. I tried that but the POST returns an empty array.
To enable FORM integration - dhtmlxgrid_form.js required ( which is part of PRO edition )

>> What other ways of saving grids is available in the standard version?
If you need to get list of rows you can
- get list of rows
    var list=grid.getAllRowIds(); // list of rows IDs in the grid
- place such value in any existing input of form
    document.forms[0].some_input.value=list;
- send form to the server
    document.forms[0].submit();

The dataprocessor and form-integration provides a useful wrappers, but grid already has API to get info about rows|cells - so it possible to achieve the same effect with some custom code.