RadAjaxManager AJAX request does not work In about 10% of cases

I have a web application that uses RadAjaxManager to populate RadComboBox controls as the user makes a selection on one of my pages. This works correctly most of the time, however, in about 10% of cases when an AJAX call is triggered, but no values ​​are loaded into the target RadComboBox. If the browser is closed and the page opens again, this behavior seems to continue, but after a few minutes, and another browser update everything works fine again.

Here are the Ajax settings for RadComboBox that trigger the AJAX request:

<telerik:AjaxSetting AjaxControlID="rcmbMarket"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="rcmbApplicationField" LoadingPanelID="RadAjaxLoadingPanel1" /> <telerik:AjaxUpdatedControl ControlID="ApplicationFieldSource" LoadingPanelID="RadAjaxLoadingPanel1" /> </UpdatedControls> </telerik:AjaxSetting> 

Here is the markup for lists with a list of initiation and sorting:

 <asp:TableRow HorizontalAlign="Center" ID="ProductRow3"> <asp:TableCell Width="25%" HorizontalAlign="Left" ID="MarketLabelCell"> <asp:Label ID="lblMarket" runat="server" Text="Market: "></asp:Label> <asp:RequiredFieldValidator ID="vldMarket" runat="server" ControlToValidate="rcmbMarket" ErrorMessage="*" ForeColor="Red" SetFocusOnError="true" ValidationGroup="grpMain"></asp:RequiredFieldValidator> </asp:TableCell> <asp:TableCell Width="25%" HorizontalAlign="Left" ID="MarketDDLCell"> <telerik:RadComboBox ID="rcmbMarket" runat="server" AllowCustomText="false" DataSourceID="MarketSource" AutoPostBack="true" CausesValidation="false" DataTextField="MarketDesc" DataValueField="pkMarketID" AppendDataBoundItems="true" OnSelectedIndexChanged="Market_Check"> <Items> <telerik:RadComboBoxItem Text="" Value="" /> </Items> </telerik:RadComboBox> <asp:SqlDataSource ID="MarketSource" runat="server" ConnectionString="<%$ ConnectionStrings:QuoteProdConn %>" SelectCommand="SELECT pkMarketID, MarketDesc FROM Data.Market WHERE Active = 'True' ORDER BY MarketDesc ASC"></asp:SqlDataSource> </asp:TableCell> <asp:TableCell Width="25%" HorizontalAlign="Left" ID="ApplicationLabelCell"> <asp:Label ID="lblApplicationField" runat="server" Text="Application Field:"></asp:Label> <asp:RequiredFieldValidator ID="vldAppField" runat="server" ControlToValidate="rcmbApplicationField" ErrorMessage="*" ForeColor="Red" SetFocusOnError="true" ValidationGroup="grpMain"></asp:RequiredFieldValidator> </asp:TableCell> <asp:TableCell Width="25%" HorizontalAlign="Left" ID="ApplicationTextCell"> <telerik:RadComboBox ID="rcmbApplicationField" runat="server" AllowCustomText="false" DataSourceID="ApplicationFieldSource" ExpandDirection="Down" AutoPostBack="true" DataTextField="AppDescription" DataValueField="pkAppFieldID" AppendDataBoundItems="true" CausesValidation="false" MaxHeight="300px"> <Items> <telerik:RadComboBoxItem Text="" Value="" /> </Items> </telerik:RadComboBox> <asp:SqlDataSource ID="ApplicationFieldSource" runat="server" ConnectionString="<%$ ConnectionStrings:QuoteProdConn %>"></asp:SqlDataSource> </asp:TableCell> </asp:TableRow> 

The following is the code to sign Market_Check when the selected market field index changes:

 Protected Sub Market_Check(ByVal sender As Object, ByVal e As System.EventArgs) Dim tmpItem As New Telerik.Web.UI.RadComboBoxItem("", "") ApplicationFieldSource.SelectCommand = "SELECT pkAppFieldID, AppDescription FROM Data.ApplicationField WHERE Active = 'True' AND fkMarketID = " & rcmbMarket.SelectedValue.ToString() & " ORDER BY AppDescription ASC " ApplicationFieldSource.DataBind() rcmbApplicationField.Items.Clear() rcmbApplicationField.Items.Add(tmpItem) rcmbApplicationField.DataBind() End Sub 

Everything is pretty simple, so I really don't know why my problem arises. Any help at all would be appreciated.

+8
ajax telerik
source share
2 answers

Try also updating ApplicationFieldSource with Telerik Ajax.

In any case, this approach is very complex, today you have so many client technology servers much better than RadAjaxManager / MS ASP.NET ajax, for example, a simple jQuery call for a simple web service.

0
source share

Have you tried checking the request and response property using FireBug (Net tab) or Fiddler? This can provide a deeper understanding if this happens with some selected rcmbMarket element values ​​(i.e. some bad data in the database). Also, check to see if the page is too heavy to publish. RadAjaxManager sends a full page even to an ajax request.

0
source share

All Articles