Save subgrid in a grid

Hello,



How can I save a subgrid in a grid?



Thanks in Advance

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. )


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


Hello,



I figured it out, so the saving part is working now :slight_smile:
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


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 )

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?