Dynamically create controls in dock using Ajax

2 posts, 0 answers
  1. Paul
    Paul avatar
    43 posts
    Member since:
    Aug 2005

    Posted 16 Feb 2010 Link to this post

    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.

  2. Pero
    Pero avatar
    1156 posts

    Posted 17 Feb 2010 Link to this post

    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:

    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.
Back to Top