Dynamic RadWindow inside RadAjaxPanel

2 posts, 0 answers
  1. Clifton Brown
    Clifton Brown avatar
    8 posts
    Member since:
    Jun 2008

    Posted 16 Mar 2011 Link to this post

    Hello, I have a content page inside my master page. The RadAjaxManager and RadWindowManager are both defined in the master page. inside the content page I have a UserControl inside of a RadAjaxPanel. There is a button in the UserControl that does a post back. inside the button's click event i'm dynamically creating a RadWindow and adding that RadWindow to the RadWindowManager in the Mater page.
    The problem I'm having is that the UserControl which holds the Button is inside a RadAjaxPanel so the dynamically created Window does not open once the button's click event has finished executing. If I remove the RadAjaxPanel the Window opens fine. I read in the forum that this is due to the fact that the AjaxPanel cannot update the WindowManager because the Window manager is in the Master Page.

    I found the following two links that explains how to get around this by updating the RadAjaxManager's ajaxSettings at runtime. in the example the controls are created at design time and the RadAjaxmanager's ajaxSettings are updated at run-time inside Page_Load. My issue is that the Control that I need to add to the ajaxSettings (the RadWindow) is created at run-time in the button's click even. Is there a way to get this to work without having to create my RadWindows at design time?

    1. http://www.telerik.com/help/aspnet/ajax/ajxMasterPageUpdateEverywhere.html
    2. http://www.telerik.com/help/aspnet/ajax/ajxLoadControlFromAnotherWebUserControlInDifferentMasterPageContentPlaceHolder.html

  2. Svetlina Anati
    Svetlina Anati avatar
    2795 posts

    Posted 18 Mar 2011 Link to this post

    Hi Clifton,

    I am not completely sure that I correctly understand your scenario and problem but as far as I understood, you need to update the RadWindow which is dynamically created. If so, what i can suggest is the following:

    1) There is some container or parent control to which you add the RadWindow - if possible, add it to the ajax settings.

    2) Dynamically create and add the ajax setting on the server once you have created the RadWindow in a similar manner as this:

    RadWindow RadWindow1 = new RadWindow();
    RadAjaxManager1.AjaxSettings.AddAjaxSetting(Button1, RadWindow1, null);

    If this does not help, please prepare a very simple reproduction demo, open a new support ticket and send it us along with detailed explanations and we will do our best to help.


    Best wishes,
    the Telerik team
Back to Top