I’ll send my code at support email address.
In code I have 2 problems.
-
Window modal, which is not modal, because I can click on the second grid
-
Grid - pro linked grid
I was trying to follow this example:
http://www.dhtmlx.com/docs/products/dhtmlxGrid/samples/13_interaction_other_components/04_pro_linked_grid.html
In this situation, we have 2 divs, where we add the main grid and the subgrid.
In my situation, I have a div, where I add a dhtmlxWindows. In windows, I want to add grid books and subgrid authors, but I don’t know where to link the grid or subgrid:
[code]window.onload = function() {
var dhxWins, w1, grid;
dhtmlx.image_path = '/codebase/imgs/';
dhxWins = new dhtmlXWindows();
dhxWins.enableAutoViewport(false);
dhxWins.attachViewportTo("winVP");
dhxWins.setImagePath("/codebase/imgs/");
iLeft = 5; iTop = 10; iWidth = 990; iHeight = 580;
w1 = dhxWins.createWindow("w1", iLeft, iTop, iWidth, iHeight);
dhxWins.window("w1").setModal(true);
w1.setText("Add, Edit, Delete and Copy Records via RightClick and Button Bar");
grdPeople = w1.attachGrid();
subgrid = new dhtmlXGridObject('gridbox_sub');
subgrid.setImagePath("/codebase/imgs/");
subgrid.setHeader("Name,UID,Total count");
subgrid.setInitWidths("100,100,100");
subgrid.enableAutoHeight(true);
subgrid.setColTypes("ro,ro,ro");
subgrid.init();
subgrid.loadXML("./xml/authors.xml", function() {
mygrid = w1.attachGrid();
mygrid.setImagePath("/codebase/imgs/");
mygrid.setHeader("Sales, Book Title, Author,Price,In Store,Shipping,Bestseller,Date of Publication");
mygrid.setInitWidths("50,150,100,80,80,80,80,200");
mygrid.setColAlign("right,left,left,right,center,left,center,center");
mygrid.setColTypes("dyn,ed,grid,price,ch,co,ra,ro");
mygrid.setSubGrid(subgrid, 2, 0);
mygrid.init();
mygrid.loadXML("./xml/grid_authors.xml");
});
};[/code]