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

Dynamically Loaded User Control in Dock with RadAjaxManagerProxy

1 Answer 35 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Dennis
Top achievements
Rank 1
Dennis asked on 21 Aug 2008, 03:53 PM

Using Q2. I have a primary web page that has the appropriate ScriptManager and RadAjaxManager specified, and it contains my RadDockLayout and associated controls. None of the RadDockLayout controls or components are part of any AjaxSettings at this time. What I want to do is to be able to have the docks with Custom User Controls dynamically loaded, and have the User Controls support Ajax.

I have no problem loading the control into the dock using LoadControl and dock.ContentContainer.Controls.Add (). It shows the appropriate User Control.

In the User Control, I have added a RadAjaxManagerProxy and an asp:Button Control with an associated Click Event.

When I execute the application, it loads the User Control into the dock appropriately, but this is what happens when I click the button. First time, it does an Ajax request back to the main page, in which you can tell that the button was click, but it does not call the Event. Second time, it performs a full postback and still doesn’t call the Event.

Am I approaching the problem correctly, or should I use a different method to enable Ajax on my User Controls?

Postback Information:

__EVENTTARGET: Widget_fb737fde-18db-49b7-af25-8dd026920e78$C$ctl00$ButtonOk

__EVENTARGUMENT:

  

 

1 Answer, 1 is accepted

Sort by
0
Dennis
Top achievements
Rank 1
answered on 21 Aug 2008, 05:25 PM
Nevermind, I realized that I was changing the Control Id for the dynamically created control on postback causing it to not match the previous Control Id value. It couldn't find the dynamically loaded control because of the Id change. Thanks.
Tags
Ajax
Asked by
Dennis
Top achievements
Rank 1
Answers by
Dennis
Top achievements
Rank 1
Share this question
or