Is it possible to adjust the size of the web grid if the user expands the size of the web page?
I would like to grow the web grid downwards if the user chooses to expand the web page to full screen.
The web grid is AJAX mode, with pages enabled due to the large data sets.
I believe this is possible using the UltraWebGrid client-side object model (CSOM) documented here:
http://help.infragistics.com/Help/NetAdvantage/NET/2008.1/CLR2.0/html/WebGrid_Object_CSOM.html
and the resize(width, height) function in particular. You can call it from window.resize event. For example:
window.onresize = function() { var grid = igtbl_getGridById("<%= UltraWebGrid1.ClientID %>"); grid.resize(50,50); }
Very helpful! It took me a while to track down the appropriate html object to determine the size of the browser canvas in order to caclulate the correct height:
Since I am using a MasterPage for my web forms, I had to enter an ID for the html element in the associated master page, then useing the document object, find this element and use this to get the clientHeight:
var grid = igtbl_getGridById(uwgName);
var htmlEl=document.all("FormViewMasterId");
var gHeight = htmlEl.clientHeight-100;
The 100 is there until I can figure out where the top of the grid element is.
grid.Element
But all the Top items I can find return 0 and this element is definitily not at the top of the page.
Any idea how I can determine the Top location of the grid on the page?