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

Problem opening Window From UserControl

1 Answer 88 Views
Window
This is a migrated thread and some comments may be shown as answers.
Sunil
Top achievements
Rank 1
Sunil asked on 10 Sep 2010, 07:05 PM
I have a .aspx page which has a user control in it. The application is ajax based.

The .aspx page has a RadWindowManager which I've made a public property to access from other user controls.

When I click on a button in my user control to open a radwindow, I don't get any errors and the correct page loads into a RadWindow. However, any styling or properties that I apply to the window are not carried across at all. It opens a RadWindow as if no settings were specified.

Any help is much appreciated!

(I have tested that the created RadWindow is actually added to the RadWindowManager... it is added. I also only have one RadWindowManager on that is on the aspx page throughout the application).

Here is my code in the aspx page for the RadWindowManager and below it is the code behind.
<telerik:RadWindowManager ID="RadWindowManager_Default" runat="server" Skin="Default" Animation="Fade" 
    AnimationDuration="300" DestroyOnClose="True">
    </telerik:RadWindowManager>
  
... code behind ...
  
public RadWindowManager RWM_Default
        {
            get { return RadWindowManager_Default; }
            set { RadWindowManager_Default = value; }
        }

Here is my code in the page_load event in the user control ascx for the new window.
RadWindow Window_FR_View;
  
        protected void Page_Load(object sender, EventArgs e)
        {
            //Add window for popup
            Window_FR_View = new RadWindow();
            Window_FR_View.ID = "RadWindow_FR";
            Window_FR_View.NavigateUrl = "OnTime_Reports/fire_report_view_popup.aspx";
            Window_FR_View.Height = Unit.Pixel(600);
            Window_FR_View.Width = Unit.Pixel(400);
            Window_FR_View.Modal = true;
            Window_FR_View.VisibleStatusbar = false;
            Window_FR_View.Behaviors = Telerik.Web.UI.WindowBehaviors.Close;
  
            ((_Default)Page).RWM_Default.Windows.Add(Window_FR_View);
  
            //Register Javascript for RadWindow
            String script4 = "" +
                "function openRadWindow_FR(Page_To_Open, RadWindow_Control_ID) " +
                "{" +  
                    "radopen(Page_To_Open, RadWindow_Control_ID);" +
                "}";
  
            ScriptManager.RegisterStartupScript(Page, Page.GetType(), "FR_LOAD", script4, true);


Here is the code for the onclick event which tries to open the window
protected void Button_Run_Fire_Report_OnClick(object sender, EventArgs e)
        {
            String script5 = "openRadWindow_FR(\"OnTime_Reports/fire_report_view_popup.aspx\", \"" + Window_FR_View.ClientID + "\");";
  
            ScriptManager.RegisterStartupScript(Page, Page.GetType(), "FR_LOAD_LIST", script5, true);
        }

1 Answer, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 14 Sep 2010, 01:19 PM
Hello Sunil,

Code looks OK so at this point I cannot tell what the problem might be. Please open a support ticket and send a sample project where this issue could be reproduced - once I have a better view over your exact setup and logic, I will do my best to provide you with a solution.


Kind regards,
Georgi Tunev
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
Window
Asked by
Sunil
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
Share this question
or