I would like to know if it is possible to drag a row from the subgrid to main grid. Also is it possible to allow moving of the columns in the subgrid?
Technically - subgrid is fully functional grid, so it possible to use any kind of API against it
You can get subgrid as
var subgrid=grid.cells(i,j).getSubGrid();
and use any API calls against it
subgrid.enableColumnMove(true);
Version of subgrid excell included in dhtmlxgrid 1.5 lack subgrid initialization events, so it may be hard to apply some modes - you can contact us directly ( at support@dhtlmx.com ) if you need latest build.
I tried your code and the call to get the subgrid is returning null. My subgrid is in the 4 column. Is the column zero based> I just received the latest build a coule of days ago, so I know I have the latest code. I would really appreciate any help in pointing me in the right direction on how to solve this.
Thanks
Please disregard my last email. I figured out the problem.
The subgrid object became available only when relative subgrid created, it occurs only on opening of relative cell
You can try to use next code
grid.attachEvent(“onSubGridCreated”,functiond(sub){
sub.enableColumnMove(true)
});
I used your code suggestion and it worked great. I do have another question. I would like to enable the drag and drop from the subgrid to the parent grid. I tried to use subgrid.enableDragAndDrop(true) on both the parent grid and the subgrid. When I try to initialize the subgrid.enableDragAndDrop(true), the code will not work. Do you have any suggestions on what I may be doing wrong or what I need to code to get this to work?
Thank You,
John
Please disregard my last posting, I was able to figure out my problem.