RadAjaxManager postback

1 Answer 273 Views
Ajax AjaxLoadingPanel ComboBox
valentino
Top achievements
Rank 1
valentino asked on 20 Jul 2021, 03:28 PM

Hello,

I have a setup like so:

<telerik:RadAjaxManager ID="RadAjaxManager1" RequestQueueSize="5" runat="server" DefaultLoadingPanelID="RadAjaxLoadingPanel1">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="pnlProductType">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="pnlProductSubType" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
</telerik:RadAjaxManager>

[...omitted...]

<asp:Panel ID="pnlProductType" runat="server">
<telerik:RadLabel runat="server" AssociatedControlID="rcbProductType" ID="lblProductType" Text="Product type"/> 
       <telerik:RadComboBox RenderMode="Lightweight" Filter="Contains" Width="100%" AllowCustomText="true" ID="rcbProductType" ClientIDMode="Static" runat="server"  DataTextField="Value" DataValueField="Id" AutoPostBack="True" ></telerik:RadComboBox>
</asp:Panel>

[...omitted...]

<telerik:RadLabel runat="server" AssociatedControlID="rcbProductSubType" ID="lblProductSubType" Text="Product subtype" />
<asp:Panel ID="pnlProductSubType" runat="server">
    <telerik:RadComboBox RenderMode="Lightweight" Filter="Contains" Width="100%" AllowCustomText="true" ID="rcbProductSubType" ClientIDMode="Static" runat="server"  DataTextField="Value" DataValueField="Id"></telerik:RadComboBox>
</asp:Panel>

Basically the idea is to populate the Product Subtype combobox with items depending on the Product Type selected, asynchronously. However, this does not occur and the form is reloaded with a hard postback, seemingly ignoring the RadAjaxManager setting.

What could be the most likely reason for this?

Thank you.

PS.: please ignore any discrepancies in control IDs, they have been altered for better readability.

valentino
Top achievements
Rank 1
commented on 22 Jul 2021, 07:39 AM

Bump

1 Answer, 1 is accepted

Sort by
0
Doncho
Telerik team
answered on 23 Jul 2021, 11:28 AM

Hi Valentino,

I would suggest you check out the implementation in our Cascading ComboBoxes demo and compare the code with yours, to see if you can spot any eventual problems.

In the provided code-snippet I cannot see the declaration of any server-side event handler of the first Combobox that is used for interacting with the second combo.  Could you please share the relevant code-behind logic so we can have a better overview? Where is the server logic for populating the  Product Subtype Combobox executed?

I would also suggest you check out the Understanding AJAX Controls article to get a better idea of how to properly use the Telerik Ajax controls.

Looking forward to your feedback.

Kind regards,
Doncho
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
Ajax AjaxLoadingPanel ComboBox
Asked by
valentino
Top achievements
Rank 1
Answers by
Doncho
Telerik team
Share this question
or