Problem:
Horizontal scroll bar appears when not needed (grid sizes should be recalculated)
Steps to reproduce:
Basing on sample file:
pro_subgrids.html
change div parameters to:
change grid script to:
mygrid = new dhtmlXGridObject(‘gridbox’);
mygrid.setImagePath("…/…/codebase/imgs/");
mygrid.setHeader(“A,B,ed,Price,In Store,Shipping,Bestseller,Date of Publication”);
mygrid.setInitWidths(“50,150,100,80,80,80,80,200”)
mygrid.enableAutoWidth(true);
mygrid.setColAlign(“right,left,left,right,center,left,center,center”)
mygrid.setColTypes(“sub_row,edtxt,ed,price,ch,co,ra,ro”);
mygrid.init();
mygrid.setSkin(“modern”);
mygrid.loadXML(“sgrid.xml”);
After loading the page (IE 7) try to expand last row “Alice in Wonderland” unwanted horizontal bar will appear;
My suggested solution:
In file dhtmlx_excell_sub_row.js:
dhtmlXGridObject.prototype._correctMonolite=function(mode){
(…)
this.setSizes();
}
NOTICE that adding:
mygrid.loadXML(“sgrid.xml”,function(){
mygrid.setSizes();
});
OR THIS:
mygrid.attachEvent(“onSubGridLoaded”,function(){
mygrid.setSizes();
})
WILL NOT fix the problem because this event occures before data render in grid