I know there are a few posts that show the same error but I have tried them and nothing is working for me. So I am going to try to describe my situation:
I have a web application with several ASPX page with a grid on it. Below is the syntax I am currently using:
<%
@ Register Assembly="Infragistics2.WebUI.UltraWebGrid.v8.3, version=8.3.20083.1009, Culture=neutral, PublicKeyToken=################" Namespace="Infragistics.WebUI.UltraWebGrid" TagPrefix="igtbl" %>
<IGTBL:ULTRAWEBGRID id="wgInventory" tabIndex="4" runat="server" width="820px" height="310px"> <Bands> <igtbl:UltraGridBand></igtbl:UltraGridBand> </Bands> <DisplayLayout RowHeightDefault="20px" SelectTypeRowDefault="Single" BorderCollapseDefault="Separate" RowSelectorsDefault="No" CellClickActionDefault="RowSelect"> <AddNewBox> <BoxStyle BorderWidth="1px" BorderStyle="Solid" BackColor="LightGray"> <BorderDetails ColorTop="White" WidthLeft="1px" WidthTop="1px" ColorLeft="White"></BorderDetails> </BoxStyle> </AddNewBox> <Pager> <PagerStyle BorderWidth="1px" BorderStyle="Solid" BackColor="LightGray"> <BorderDetails ColorTop="White" WidthLeft="1px" WidthTop="1px" ColorLeft="White"></BorderDetails> </PagerStyle> </Pager> <HeaderStyleDefault CssClass="gridHeaderDefault"> <BorderDetails ColorTop="White" WidthLeft="1px" WidthTop="1px" ColorLeft="White"></BorderDetails> </HeaderStyleDefault> <GroupByRowStyleDefault CssClass= "gridGroupByRowDefault"></GroupByRowStyleDefault> <RowSelectorStyleDefault CssClass= "gridRowSelectorsDefault"></RowSelectorStyleDefault> <FrameStyle Width="825px" Height="300px" CssClass= "gridFrameDefault"></FrameStyle> <FooterStyleDefault CssClass="gridFooterDefault"> <BorderDetails ColorTop="White" WidthLeft="1px" WidthTop="1px" ColorLeft="White"></BorderDetails> </FooterStyleDefault> <RowExpAreaStyleDefault CssClass= "gridRowExpAreaDefault"></RowExpAreaStyleDefault> <SelectedHeaderStyleDefault CssClass= "gridSelectedHeaderDefault"></SelectedHeaderStyleDefault> <EditCellStyleDefault CssClass="gridEditCellDefault"></EditCellStyleDefault> <SelectedGroupByRowStyleDefault CssClass= "gridSelectedGroupByRowDefault"></SelectedGroupByRowStyleDefault> <SelectedRowStyleDefault CssClass= "gridSelectedRowDefault"></SelectedRowStyleDefault> <RowAlternateStyleDefault CssClass= "gridRowAlternateDefault"></RowAlternateStyleDefault> <RowStyleDefault CssClass="gridRowDefault" BorderColor="silver" BorderStyle="solid" BorderWidth="1px"></RowStyleDefault> </DisplayLayout></IGTBL:ULTRAWEBGRID>
In the .cs file I am calling my JavaScript by using the following, this code is inside of my wgInventory_InitializeLayout method:
ClientScript.RegisterStartupScript(
this.GetType(), "Startup", "<script language='javascript'>EditableAlternateRowsStyle2()</script>");
Inside of the JavaScript file I have the following:
function
EditableAlternateRowsStyle2(){ // getting the grid info var grid = igtbl_getGridById("wgInventory"); . . .
When this line of JavaScript executes grid = undefined.Why is this. It works just fine on several other pages, but I get this on several pages as well.
Please Help.
Thank You,Pat
Hello Pat,I know a few months have passed since you asked this question but in case you still need my assistance I would be glad if I can provide any help. Please try getting our control via var t1=document.getElementById('txtText'); Its highly recommended to upgrade to a new version of NetAdvantage which is still supported with service releases - http://es.infragistics.com/support/product-lifecycle.aspx#ProductLifecycle .