This is a migrated thread and some comments may be shown as answers.

AJAX Manager error

1 Answer 55 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Aaron
Top achievements
Rank 1
Aaron asked on 21 Nov 2012, 05:31 PM
Hello,

Update:  I just tried other pages that use the ajax manager and none of them now work.

I have a number of dropdowns that on selectedindexchange refresh a grid.  I am using the ajax manager with these controls.  For some reason I am getting this error and I don't believe anythign has changed that I can tell.  I am not certain what it means though.  Anyone have any idea what causes it or how to fix it?  

I don't think it has anything to do with the code behind as this all worked and when i select an item in the dropdown the selectedindexchanged event never gets hit.  It is something happening in between. 

I thought I could attach a screenshot but doesn't look as thought I can.  The error is as follows:  

Microsoft JScript runtime error:  Unable to get value of the property 'id':  object is null or undefined.  

If i click break the code that is erroring is as follows:
if(Array.contains(h,e.get_postBackElement().id)){this._isRequestInProgress=true;

Thanks.

Here is the markup of one of the dropdowns
<div class="row-fluid">
        <div class="span8">
            <div class="category-select">
                <div class="control-group">
                    <label for="ddlStore" class="control-label">Store: </label>
                    <div class="controls">
                        <asp:DropDownList ID="ddlStore" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlStore_SelectedIndexChanged">
                        </asp:DropDownList>
                    </div>
                </div>
            </div>
        </div>
        <div class="span2">
        </div>
    </div>

Markup of the ajax manager
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
       <AjaxSettings>
           <telerik:AjaxSetting AjaxControlID="ddlStore">
               <UpdatedControls>
                   <telerik:AjaxUpdatedControl ControlID="grdPriceTags" LoadingPanelID="rajaxLoading" />
               </UpdatedControls>
           </telerik:AjaxSetting>
           <telerik:AjaxSetting AjaxControlID="ddlItemType">
               <UpdatedControls>
                   <telerik:AjaxUpdatedControl ControlID="grdPriceTags" LoadingPanelID="rajaxLoading" />
               </UpdatedControls>
           </telerik:AjaxSetting>
           <telerik:AjaxSetting AjaxControlID="ddlItemStatus">
               <UpdatedControls>
                   <telerik:AjaxUpdatedControl ControlID="grdPriceTags" LoadingPanelID="rajaxLoading" />
               </UpdatedControls>
           </telerik:AjaxSetting>
           <telerik:AjaxSetting AjaxControlID="ddlVendor">
               <UpdatedControls>
                   <telerik:AjaxUpdatedControl ControlID="grdPriceTags" LoadingPanelID="rajaxLoading" />
               </UpdatedControls>
           </telerik:AjaxSetting>
           <telerik:AjaxSetting AjaxControlID="ddlMinorCode">
               <UpdatedControls>
                   <telerik:AjaxUpdatedControl ControlID="grdPriceTags" LoadingPanelID="rajaxLoading" />
               </UpdatedControls>
           </telerik:AjaxSetting>
           <telerik:AjaxSetting AjaxControlID="ddlPriceTagType">
               <UpdatedControls>
                   <telerik:AjaxUpdatedControl ControlID="grdPriceTags" LoadingPanelID="rajaxLoading" />
               </UpdatedControls>
           </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="txtSKU">
               <UpdatedControls>
                   <telerik:AjaxUpdatedControl ControlID="grdPriceTags" LoadingPanelID="rajaxLoading" />
               </UpdatedControls>
           </telerik:AjaxSetting>
       </AjaxSettings>
 
 
               </telerik:RadAjaxManager>

Code Behind:
protected void ddlStore_SelectedIndexChanged(object sender, EventArgs e)
        {
            FillTagGrid();
        }
 
protected void FillTagGrid()
        {
            //check for valid params
 
            Database.sp_PriceTagList_Select ds = new sp_PriceTagList_Select();
            Database.sp_PriceTagList_SelectTableAdapters.PriceTagList_SelectTableAdapter ta = new Database.sp_PriceTagList_SelectTableAdapters.PriceTagList_SelectTableAdapter();
            ta.Fill(ds.PriceTagList_Select,
                this.ddlItemType.SelectedIndex,
                this.ddlItemStatus.SelectedIndex,
                this.ddlStore.SelectedValue,
                this.ddlVendor.SelectedValue,
                this.ddlMinorCode.SelectedValue,
                (String.IsNullOrEmpty(txtSKU.Text) ? null : txtSKU.Text));
 
            this.grdPriceTags.DataSource = ds.PriceTagList_Select;
            this.grdPriceTags.DataBind();
 
            //
            InitGrid();
 
            //update footer with tag count
            string footer = "Price Tags: {0}";
            if (grdPriceTags.FooterRow != null && ds.PriceTagList_Select.Rows != null)
                this.grdPriceTags.FooterRow.Cells[1].Text = String.Format(footer, ds.PriceTagList_Select.Rows.Count.ToString());
        }

1 Answer, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 26 Nov 2012, 03:34 PM
Hi,

Could you please ensure that you are using Auto ClientIDMode for the controls in the application? Also please test the application by using regular asp UpdatePanel instead of RadAjax and verify if the error still persists.

Regards,
Pavlina
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Ajax
Asked by
Aaron
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Share this question
or