Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
WebDataGrid jscript error in an UpdatePanel


I am getting a popup dialog that states: "Microsoft JScript runtime error: 'this._element.offsetHeight' is null or not an object".  the VS2008 debugger breaks in the infragistics function below (i have indicated the line with "<<<<<<<<" that the caused the error):

 _adjustGridLayout: function()
 if (this._element.offsetHeight > 0)   // <<<<<<<<<<< 'this._element' is null according to the debugger!
  if (this._adjustTimerId)
   this._adjustTimerId = null;
  this._gridUtil._fireEvent(this, "InitializingLayout");
  var tblWidth = (this._elements.dataTbl) ? this._elements.dataTbl.offsetWidth : -1;

  this._onResize({ "clientHeight": this._element.clientHeight }, true);

  if (this._isWidthEmpty && tblWidth > 1) = (tblWidth + (this._vScrBar ? this._vScrBar.offsetWidth : 0)) + "px";
  // = this._element.firstChild.offsetWidth + "px";

  if (this._elements.dataTbl)
   this._notifyBehaviorTData = new $IG.NotifySizeChangedBehavior(this._elements.dataTbl, Function.createDelegate(this, this._onDataTblResize));

  this._notifyBehavior = new $IG.NotifySizeChangedBehavior(this._element, Function.createDelegate(this, this._onResize));

  this._gridUtil._fireEvent(this, "InitializedLayout");
  if (this._adjustTimerId == null)
   this._adjustTimerId = setInterval(Function.createDelegate(this, this._adjustGridLayout), 100);

I spent quite a bit of time stripping down my webform page to get something minimal that duplicates the pbm.  Below is that code.  Notice that the culprit is the fact that the WebDataGrid1 is nested withing the UltraWebListbar Group <Template> and that this group is initially "collapsed" - zero height!  an UpdatePanel wraps everything as well!  if you remove the UpdatePanel, then the error no longer occurs.

to duplicate the jscript error, simply run the page and click the "Click Me" button.  this causes a partial page postback.  when the browser is processing the response, the jscript error described above occurs.  if i click "continue", then the page and datagrid appears to be rendered ok.

 I am using 2008 Volume 3 (CLR 3.5) and running IE7

Please let me know if you need any other information to help fix this issue.  I would greatly appreciate getting this resolved as this behavior is critical to the operation of our webform!




<%@ Page Language="C#" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">

<%@ Register Assembly="Infragistics35.WebUI.UltraWebNavigator.v8.3, Version=8.3.20083.1009, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb"
    Namespace="Infragistics.WebUI.UltraWebNavigator" TagPrefix="ignav" %>
<%@ Register Assembly="Infragistics35.WebUI.UltraWebListbar.v8.3, Version=8.3.20083.1009, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb"
    Namespace="Infragistics.WebUI.UltraWebListbar" TagPrefix="iglbar" %>
<%@ Register Assembly="Infragistics35.Web.v8.3, Version=8.3.20083.1009, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb"
    Namespace="Infragistics.Web.UI.GridControls" TagPrefix="ig" %>
<%@ Register Assembly="Infragistics35.Web.v8.3, Version=8.3.20083.1009, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb"
    Namespace="Infragistics.Web.UI.LayoutControls" TagPrefix="ig" %>

<script runat="server">

    protected void Button1_Click(object sender, EventArgs e)


<html xmlns="">
<head runat="server">
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePageMethods="true">
        <asp:UpdatePanel ID="UpdatePanel1" UpdateMode="Conditional" runat="server">
                <ig:websplitter id="WebSplitter1" runat="server" enableviewstate="false"
                    height="100%" width="100%" borderstyle="None" orientation="Horizontal">
                    <ig:SplitterPane Size="150px" BorderStyle="None" BorderWidth="0px" ScrollBars="Hidden">
                            <asp:Button ID="button1" runat="server" Text="Click Me" OnClick="Button1_Click" />
                    <ig:SplitterPane BorderStyle="None" BorderWidth="0px" ScrollBars="Hidden">
                            <iglbar:UltraWebListbar ID="UltraWebListbar1" runat="server" EnableViewState="false"
                                Width="100%" Height="100%" BarWidth="100%" BorderStyle="None" BorderWidth="0px"
                                MergeStyles="True" ViewType="ExplorerBar" GroupSpacing="2px" GroupExpandEffect="Slide"
                                Font-Size="11pt" ItemIconStyle="Small" AllowGroupMoving="GroupSwapping" HeaderClickAction="None">
                                    <iglbar:Group Expanded="false" Text="Test group with a grid">
                                            <ig:WebDataGrid ID="WebDataGrid1" runat="server" EnableViewState="false"
                                                AutoGenerateColumns="true" DataKeyFields="ID" Width="100%" Height="100%">