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

Dynamic RadWindow inside RadAjaxPanel

1 Answer 148 Views
Window
This is a migrated thread and some comments may be shown as answers.
Clifton Brown
Top achievements
Rank 1
Clifton Brown asked on 17 Mar 2011, 02:34 AM
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

Thanks
Cliff

1 Answer, 1 is accepted

Sort by
0
Svetlina Anati
Telerik team
answered on 18 Mar 2011, 12:56 PM
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,
Svetlina
the Telerik team
Tags
Window
Asked by
Clifton Brown
Top achievements
Rank 1
Answers by
Svetlina Anati
Telerik team
Share this question
or