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

RadAjaxManagerProxy in AJAX dynamically loaded ascx UserControl.

2 Answers 80 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Zdeněk
Top achievements
Rank 1
Zdeněk asked on 04 Jun 2013, 12:02 PM

Hi,

I have this scenario:

  • aspx page with some buttons
  • a placeholder
  • buttons are linked by RadAjaxManager to placeholder
  • on click I load ascx UserControl into placeholder (through AJAX, similar to your help page http://www.telerik.com/help/aspnet-ajax/ajax-load-user-controls.html)

In the ascx UserControl I have RadAjaxManagerProxy and some controls ajax linked by this RadAjaxManagerProxy.

Everything works fine with one exception. I found in Firebug that every ajax postback in user control causes refresh of full UserControl area, not just control which is target of ajax.

Is possible to achieve behavior that AJAX in user control change only target (=UpdatedControls) control?


Example: this is RadAjaxManagerProxy configuration from user control. Problem is that when I press btnCheck, AJAX will update not only Label1, but also Label2 and whole user control...

<telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="btnCheck">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="Label1"  />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManagerProxy>

Thank you!

2 Answers, 1 is accepted

Sort by
0
Accepted
Kostadin
Telerik team
answered on 07 Jun 2013, 08:10 AM
Hello,

I would suggest you to add AJAX settings programmatically instead using RadAjaxMananagerProxy. More information and an example could be found at the following help article.

Regards,
Kostadin
Telerik
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 the blog feed now.
0
Zdeněk
Top achievements
Rank 1
answered on 07 Jun 2013, 08:19 AM
Thank you for reply. It helped and my scenario works as I would like to have.

Zdenek
Tags
Ajax
Asked by
Zdeněk
Top achievements
Rank 1
Answers by
Kostadin
Telerik team
Zdeněk
Top achievements
Rank 1
Share this question
or