Categories | Question details Back To List | ||
grid from table does not shrink to the container Code(simplified) <div id="searchDIV" style="width:600px; height:50px; overflow=scroll;"> <table id="some_table" height="200"> <tr> <td>Header A</td><td>Header B</td> </tr> <?php $i=0; while (i<55) { echo "<tr><td>"; echo $i; echo "<td></tr>"; } ?> </table> </div> <script> var mygrid = dhtmlXGridFromTable("some_table"); </script> ... when populating the table although the scrollbars show they exceeds way past the height of the div. I think I tried everything and I am stuck, Thanks a lot Answer posted by Support on Jun 16, 2008 05:46 When grid initialized from table - it takes the same sizes as original table. You can a) provide fixed sizes <table id="some_table" height="200" gridHeight="50px"> or b) force grid autosizing var mygrid = dhtmlXGridFromTable("some_table"); mygrid.enableAutoHeight(true,"auto"); mygrid.setSizes(); |