Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Nico on Jan 25, 2008 08:16
open dhtmlx forum
Save subgrid in a grid

Hello,

How can I save a subgrid in a grid?

Thanks in Advance
Answer posted by Stanislav on Jan 25, 2008 15:59
After subgrid initiated ( first time opened ) you can access it by
    var subgrid=grid.cells(id,index).getSubGrid();
and use any existing API to save data ( serialization, dataProcessor and etc. )
Answer posted by Nico on Jan 29, 2008 01:25

Hi again,

I've been trying, but it is not working...
I get an error my row doesn't excist.

How do I know when my subgrid is initiated because I think thats why it's not working.

Can you please give me an example, how I can save my subgrid with dataProcessor? 

Thanks a lot

Nico

Answer posted by Nico on Jan 29, 2008 02:55

Hello,

I figured it out, so the saving part is working now :)
Added the dateProcessor part in "dhtmlxgrid_excell_sub_row.js" in the function

dhtmlXGridObject.prototype._sub_row_render={
...
"grid":function(that,d,td,c){
--> In this function


But I have an other question. Is it also possible to print the subgrid? Because when I click print now I get only the grid without the subgrid data.

Thanks

Answer posted by Support on Jan 29, 2008 07:45
>> Is it also possible to print the subgrid?
In current version printView functionality work only for master grid, subgrids not included.
We preparing major update for printView functionality, and as part of next version, ability to print subgrids will be added. For now it is impossible ( or at least require some serious code modification )
Answer posted by Francesco on Feb 08, 2008 03:02
Hello Nico,

Could you please write here which function did you insert into "dhtmlxgrid_excell_sub_row.js"?
How did you manage your subgrid to save data?