Categories | Question details Back To List | ||||||||
add anothergrid as innerHtml for particular row i'm using dhtmlxgrid my problem is that i need another dhtmlxgrid in parent grid when i select any row on parentgrid. this child grid will be open just next to parentgrid.and there will be option to close child grid and show parent grid. for earch child grid i have to call serveraction that will return list object and i have to print that list in child grid. It's very urgent.Please provide me sample example for it as soon as possible. Answer posted by Support on Dec 12, 2008 03:09 There are three possible solution a) use sub-grid functionality http://dhtmlx.com/docs/products/dhtmlxGrid/samples/extended_modes/pro_subgrids.html?un=1229080206000 b) use grid as cell editor http://dhtmlx.com/docs/products/dhtmlxGrid/samples/interaction_other_components/pro_linked_grid.html?un=1229080236000 ń) you can use onRowSelect event to catch moment when row in parent grid selected and show some custom container with second grid, which can be loaded with data according to selected row. Answer posted by shweta on Dec 12, 2008 03:20 i'm using ParentGrid as mygrid function doInitGridForCreate(){ mygrid = new dhtmlXGridObject('mygrid_container'); mygrid.setInitWidths("50,30,30,100,100,100,60,60,100,100,100,100"); mygrid.setSkin("MWB2");
}
and child grid as cGrid
var cGrid; cGrid.setImagePath("images/"); cGrid.setInitWidths("100,100"); cGrid.setSkin("MWB2"); cGrid.init();
and on rowselect i call function test(){ childGrid(myData); }
i'm using (mygrid.setSubGrid(cGrid,1,0);) in child grid it is not working please provide me solution for this Answer posted by shweta on Dec 12, 2008 03:51 Please provide me solution for my query i have define div at the bottom of my jsp.......so the child gid is open at the bottom not at cloumn 1.Please suggest me solution it's very urgent <div id="alternateSupplierDIV" "width=100%" height="250px" align="left" > Answer posted by Support on Dec 12, 2008 04:20 If you need just to show some sub-grid - you need not use setSubGrid(cGrid,1,0); setSubGrid functionality used for creating linked grids, which based on special column type In your case, you can replace setSubGrid command with some custom js code which will made alternateSupplierDIV container visible. Answer posted by shweta on Dec 12, 2008 04:26 if i want to attach subGrid with parent grid's any column how can i do that.... i need when i click on that cell i call my test function from where i'm creating subgrid. so where i have to define container of subgrid?
Answer posted by shweta on Dec 12, 2008 04:29 OR can u provide me js code to visible alternatesupplier Div when child grid is created that alternatesupplier div shuld visble at parent grid's first column Answer posted by Support on Dec 12, 2008 05:43 Please check attached sample Attachments (1)
Answer posted by shweta on Dec 14, 2008 20:19 thanx for sending that sample. But now i want to sorting in subgrid.But when i click on that grid it will close.cant able to sort that. Please provide solution for that as soon as possible. |