Grid window resize

I have aet up a simple grid in a DIV set to Width=“100%” Height=“100%” - which is supplied with XML by an .asp script, pretty much in line with you /asp server side example - the problem is that the div wwill auto resize to the height of the window, but the width just gradually SHRINKS if I resize the browser in any way, an there is always a horizontal scroll bar visible…



If I leave the mygrid.setInitWidths setting out the grid is incomplete, single wide column, but it does resize in both dimensions as expected…



Please help



Script is below








































If you want grid columns change it’s size depend on the window resize you should set it’s width in percents. You can do it with setInitWidthsP method:


var mygrid = new dhtmlXGridObject(‘products_grid’);
mygrid.setImagePath("…/codebase/imgs/");
mygrid.setHeader(“Doc,Rev,Originator”);
mygrid.setInitWidthsP(“50,10,40”);
mygrid.setColAlign(“left,left,left”);
mygrid.setSkin(“modern”);
mygrid.enableSmartRendering(true);
mygrid.enableAutoHeight(true);
mygrid.init();
mygrid.loadXML(gridQString);