Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Paul K on Jul 24, 2008 10:31
open dhtmlx forum
Grid in IE causes vertical size to increase without stopping

I create a dhtmlxGrid object in a page with a target of a div tag. When the page is displayed in Internet Explorer (6 or 7) the control is displayed properly but the vertical size of the page continues to grow without stopping. It appears to be in an infinite loop.

In this small example the header for the grid appears briefly and then disappears but in our project page the control remains visible. In either case the page continues to grow. (Note we are not using tables in our HTML but rather using CSS and div tags to control the layout.)

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Test dhtmlxGrid with div</title>
<link rel="STYLESHEET" type="text/css" href="./codebase/dhtmlxgrid.css">
<link rel="STYLESHEET" type="text/css" href="./codebase/dhtmlxgrid_skins.css">
<script src="./codebase/dhtmlxcommon.js"></script>
<script src="./codebase/dhtmlxgrid.js"></script>
<script src="./codebase/dhtmlxgridcell.js"></script>
</head>

<body>
<div id="dhtmlxContent">
 
</div>
<script>
theGrid = new dhtmlXGridObject('dhtmlxContent');
theGrid.setImagePath("./codebase/imgs/");
theGrid.setHeader("Business,Description");
theGrid.setInitWidthsP("30,70");
theGrid.setColAlign("left,left");
theGrid.init();
theGrid.addRow("Row1","");
theGrid.addRow("Row2","");
</script>
</body>
</html>
Answer posted by Support on Jul 25, 2008 01:44
In sample above you need to specify any fixed size to the grid container
    <div id="dhtmlxContent" style='height:150px; width:50%;'>
or use auto-size mode
    grid.enableAutoHeight(true);