Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted on Jul 01, 2009 09:04
open dhtmlx forum
Dhtmlx grid disappers on IE

Hello,

I have a grid inside dhtmlxtabbar component. This tabber component is inside a div (collapsableDiv in following code) which can be set to display none/block by user action.

On IE7/6 once display is set to none then the grid vanishes only tab component border and grid border is seen but not the grid. I used IE Webdevelper component and found out and the div which is under objBox div has width of 1px.

Please note that the width of all the divs for tabbar and grid are in percentage.

<div id="collapsableDiv">
<div mode="top" id="tabbarDiv"
class="dhtmlxTabBar"
tabheight="20px;" tabstyle="winDflt"
imgpath="dhtmlxsuite/dhtmlxTabbar/codebase/imgs/"
style="height:150px;width:93%;float:left;margin-left:5px;left;margin-right:5px;overflow:hidden;"
offset="3" skinColors="#FCFBFC,#F4F3EE">
<div id="tab1" name="Tab1" width="60px" style="width:100%;overflow:hidden;">
<div id="gridbox" style="width:100%;height:120px;"></div>
</div>
</div>
</div>
Answer posted by Alex (support) on Jul 02, 2009 01:21

Hello, 

the code that you provide doesn't show how grid is intialized. 

The example of grid initialization:

<div id="collapsableDiv"> 
<div mode="top" id="tabbarDiv" class="dhtmlxTabBar" oninit="initGrid()" tabheight="20px;" tabstyle="winDflt" imgpath="../../codebase/imgs/" style="height:150px;width:93%;float:left;margin-left:5px;left;margin-right:5px;overflow:hidden;" offset="3" skinColors="#FCFBFC,#F4F3EE"> 
<div id="tab1" name="Tab1" width="60px" style="width:100%;overflow:hidden;"> 
<div id="gridbox" style="width:100%;height:120px;"></div> 
</div> 
</div> 
</div>

<script>
function initGrid(){
 grid = new dhtmlXGridObject('gridbox'); 
 grid.setHeader(...); 
 grid.setInitWidths(...) 
 ...
 grid.init(); 
 grid.loadXML("some.xml");
}
</script>



Answer posted on Jul 02, 2009 13:32

Following is my initialization code    -        

            mygrid = new dhtmlXGridObject("gridbox");
            mygrid.setHeader("Recent");
            mygrid.setNoHeader(true); 
            mygrid.setInitWidthsP("93");
            mygrid.setColAlign("left");
            mygrid.setColTypes("tree");
            mygrid.setImagePath("dhtmlxsuite/dhtmlxTree/codebase/imgs/custom/");
            mygrid.enableTreeGridLines("true");
            mygrid.setSkin("light");
            mygrid.enableDragAndDrop(true);
            mygrid.enableMercyDrag(true);

            mygrid.init();
            mygrid.setEditable(false);
            mygrid.loadXMLString(xmlString);

Answer posted by dhxSupport on Jul 06, 2009 06:46
Unfortunately we cannot reproduce this issue locally. Could you please provide us example where we can reproduce this issue (You can send this example directly to the support@dhtmlx.com)