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
145
igtbl_getGridById = Undefined Why?
posted

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