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

Dynamically create controls in dock using Ajax

1 Answer 45 Views
Dock
This is a migrated thread and some comments may be shown as answers.
Paul
Top achievements
Rank 1
Paul asked on 16 Feb 2010, 05:59 PM
Hope someone can help

I have a single RadDockZone with two RadDock's called Admin and Content.

On initial page load I dynamically load a user control into the Admin dock area and this control has a number of buttons on it labelled with various functions such as 'Categories', 'Companies' etc.

What I want to happen is if a button is pressed a user control that is related to that button is dynamically created and added to the controls collection of the content dock control. However, I would like it to do this without a full page postback.

Is this possible and if so can anyone tell me how to do it?

One other caveat is that the content user controls have there own RadAjaxPanels etc. on which may spoil things.

Thanks for any help.

Paul

1 Answer, 1 is accepted

Sort by
0
Pero
Telerik team
answered on 17 Feb 2010, 09:29 AM
Hello Paul,


Maybe the easiest way to do this is to place an AJAX Panel (UpdatePanel or RadAjaxPanel) inside the Admin and Content docks and add the controls directly to the AJAX Panel. Another way is to wrap the entire content (the DockZone with the docks) with an AJAX Panel. Please note that in case your docks perform postbacks on movement they must be docked or an error might occur if you drag a dock outside the AJAX Panel.

Since the user controls also contain AJAX panels, you should carefully configure the AJAX triggers so that only the right panels will get updated.  


PS: You should take a look at the following projects from our Code Library. They might give you an idea of how to achieve this:


Regards,
Pero
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
Dock
Asked by
Paul
Top achievements
Rank 1
Answers by
Pero
Telerik team
Share this question
or