This is the code i used
var gridID;
gridID = gridName;
setGridHeight();
}
var grid = igtbl_getGridById(gridID);
grid.resize(750, myHeight);
var myWidth = 0, myHeight = 0;
//Non-IE
myWidth = window.innerWidth;
myHeight = window.innerHeight;
//IE 6+ in 'standards compliant mode'
myWidth = document.documentElement.clientWidth;
myHeight = document.documentElement.clientHeight;
//IE 4 compatible
myWidth = document.body.clientWidth;
myHeight = document.body.clientHeight;
This seems to work for grid containing few rows, but if the number of rows exceeds even 20, the height of the grid turns out to be greater than the height of the browser.
Why isn't this working and is there any other way for me to do what i need? Any help will be appreciated.
Thank you,
Good to hear that.
Can you use the "Answer" button and the star ratings to mark your problem as solved?
Thank you Asairam, that worked!!
Can you try following:
Enclose the grid in a div tag and set the height of div tag dynamically based on window size.
Set the following properties for the grid:
<FrameStyle Height="100%"../>
< /DisplayLayout>
I think this should work.
If you look at my inital post, i'm using the resize() method.
It resizes the grid if the number of rows is less but if the number of rows is a lot more i.e. if the grid gets longer than the window's height, it doesn't seem to set a fixed height that corresponds to the height of the window.
Anyone?
Well, this is a tricky topic and really depends on a lot of things, for example browser, DOCTYPE, etc, etc. I can suggest a few things:
1) The CSOM resize() method documented here:
http://help.infragistics.com/Help/NetAdvantage/NET/2008.2/CLR2.0/html/WebGrid_Object_CSOM.html
2) Following this thread and using the resizeGrid() method suggested by "lallebob"
http://forums.infragistics.com/forums/p/4326/20947.aspx#20947