WebGrid Height Issue

1 reply. Last post: December 21, 2011 11:12 PM by Handy Surya
Tags :
  • New Discussion
  • New Question
  • New Product Feedback
Arun IyerMember

Hi,

 

Recently we converted our application from .NET2.0 to .NET4.0 and for supporting 64 bit we upgraded the web grid to version7x (all dll version we use are attached in the screen shot)

After migration we found a strange issue on height, this is happening only on Firefox, IE8 and above browsers.

The grid is not sizing the height to the window size. AutoHeight & SizeHeightby is not working as it used to work

So we decide to create a sample application in the way how we use the grid to see whether this issue is something which is generated by our application

The sample proved that this is a generic issue in the grid

Attached is a sample application create using Visual Studion2010 (.NET4.0). In this we have used 2 web form

Webform1.aspx

-          Has some literal value at the top and a grid

-          You can see the height of the grid is not adjusted to the window height

Webform2.aspx

-          Has some literal value at the top and a grid

-          In this we found a hack to set the height using JavaScript

Basically what we feel is, in grid html container, a style expression calling function WGUI.GH(this) is not doing the height adjustment correctly. It does not resize height of the grid because function that it calls always return null and NeedHeightResize return a true value always in visual studio 2010

NeedHeightResize is false when compiled in 2005 while in 2010 it is always true and WGUI.GH(this) does not resize the grid html container in 2010 because of this.

also 'AutoHeight' on client is always true without any regard what is set in the layout setting unlike other attributes.

Excerpt of the html code presenting grid container

<div id="ctl00_ContentPlaceHolder1_grdListPerson_of" style="position:relative; ;height: expression(WGUI.GH(this));width: 100%;">

Excerpt of the JavaScript code presenting function, that is used for resizing height

function(v06419) { if (IS.ie) v06419 =v06419.children[0];  if (!v06419 ||typeof(v06419)=="undefined") return;  var v78d64; var v5b64 =ISGetObject(v06419.id.substring(0,v06419.id.length -2)); if (!v5b64) return; if (v5b64.CacheFrameHeight !=null) { if (v5b64.NeedHeightResize) { v5b64.CacheFrameHeight =null; return; } v78d64 =v5b64.CacheFrameHeight; } else { var vbe965 =Number(parseFloat(v06419.currentStyle.borderTopWidth)); if (isNaN(vbe965)) vbe965 =0; v78d64 =document.body.clientHeight -ISPosLib.getTop(v06419)+v5b64.LayoutSettings.SizeHeightBy -(vbe965 *2); v5b64.CacheFrameHeight =v78d64; } if (v78d64<=0) v5b64.NeedHeightResize =true; return v78d64; }

 

Can you let us know what's the cause of this behaviour ?

 

After spending hours on this, we found a work around for this using  a javascript on page load,which we might need to do it on many pages.This javascript code adjusts the height , but when the browser is resized , it doesn't adjust the height. (this is done in webform2.aspx)

This is not a viable solution for us as we will have to make this change in all of the pages using grid (100+)

 

I am attaching the sample application which we used to reproduce the issue and a screenshot of the intersoft dll versions

In anticipation of your quick response..

 

Thanks

Ar


All times are GMT -5. The time now is 3:55 AM.
Previous Next