Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Chris Thurrott on Jul 10, 2009 03:55
open dhtmlx forum
IE7 - enableAutoHeight with div height set as percentage

I am trying to set the height of my grid div to the available space (88%) and have enableAutoHeight false so that the grid will scroll. Unfortunately this does not work in IE7 - the grid headers appear but no data.

Part of my problem is that I cannot find the full syntax for the enableAutoHeight function anywhere on your site - I know there are parameters other than true and false but I don't know what they mean.

I'm using the following code:

<div id="users_grid" style="width:100%; height:88%;"> </div>
<script>
grid = createVelaGrid('users_grid');

grid.setHeader("First name,Last name,Email,Status,Role,Account");
grid.setColTypes("ro,ro,ro,ro,ro,ro");
grid.setColSorting("str,str,str,str,str,str");
grid.setInitWidths("150,150,*,90,120,120");
grid.enableAutoHeight(false);
grid.objBox.style.overflowX="hidden";

function doOnRowDblClicked(rowID,celInd){
<%= remote_function :url => edit_user_url, :with => "'id=' + rowID", :method => :get %>;
}
grid.attachEvent("onRowDblClicked",doOnRowDblClicked);

grid.init();
grid.load(<%= "'" + users_list_url(:format => :xml) + "'" %>);
</script>


As a workaround hack I tried the following definition for the div - behavior is less than desirable though
<div id="users_grid" style="width:100%; _height:480px; min-height:88%;"> </div>

I'd appreciate any help you can give!
Answer posted by dhxSupport on Jul 10, 2009 09:18
Unfortunately we cannot reproduce this issue locally. Please check example at the attachment 
Parametere of enableAutoHeight(mode, maxHeight, countFullHeight) are:
mode - true/false
maxHeight - maximum height before scrolling appears (no limit by default)
countFullHeight - control the usage of maxHeight parameter - when set to true all grid height included in max height calculation, if false then only data part (no header) of grid included in calcualation (false by default)
Attachments (1)