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

Can’t open RadWindow from Master/Content page.

2 Answers 158 Views
Window
This is a migrated thread and some comments may be shown as answers.
Thomas
Top achievements
Rank 1
Thomas asked on 07 Feb 2010, 03:26 AM

The example given in the RadControls documentation (getting started) is working fine in regular aspx pages, but I can’t get it to work from the Master/Content page. It could make it work in the Content Page  after setting the property of “VisibleOnPageLoad”  to TRUE, however it will display  RadWindow automatically, when the page is loaded.
My problem is that I don’t want to display the RadWindow initially when the page is loaded.  I need to display RadWindow only after a control (ex.Button) is clicked.
TheRadScriptManager is on MasterPage, the RadWindowManager is on Content Page.

 

How can I open RadWindow using a control (ex. Button) from a content page?
Thank You,
Thomas

This is my  code from content page:

<%@ Page Title="" Language="C#" MasterPageFile="~/DefaultMaster.Master" AutoEventWireup="true" CodeBehind="Default1.aspx.cs" Inherits="TestRadWindow.Default" %> 
<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %> 
 
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">  
</asp:Content> 
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">      
 <telerik:RadWindowManager ID="RadWindowManager1" runat="server"   
        ReloadOnShow="True">  
            <Windows> 
                <telerik:RadWindow ID="rdWnd" runat="server" Behavior="Default"   
                    InitialBehavior="None" Left="" NavigateUrl="Sample1.aspx"   
                    OpenerElementID="LinkButton1" Top="" ReloadOnShow="True" Visible="True"   
                    EnableViewState="True" > 
                </telerik:RadWindow> 
            </Windows> 
        </telerik:RadWindowManager> 
          
    <asp:LinkButton ID="LinkButton1" runat="server">LinkButton</asp:LinkButton> 
</asp:Content> 
 

2 Answers, 1 is accepted

Sort by
0
Accepted
Georgi Tunev
Telerik team
answered on 08 Feb 2010, 07:29 AM
Hi Thomas,

The opener can be any element on the page that has an ID attribute - the property expect a client ID, so if you are setting it to a server element, you need to use its ClientID
OpenerElementID="<%# LinkButton1.ClientID %> "


Regards,
Georgi Tunev
the Telerik team

Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Follow the status of features or bugs in PITS and vote for them to affect their priority.
0
saeed
Top achievements
Rank 1
answered on 06 Oct 2012, 04:02 PM

Hi

add this line to page_load method

RadWindowManager1.Windows[0].OpenerElementID = RadButton1.ClientID;

Tags
Window
Asked by
Thomas
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
saeed
Top achievements
Rank 1
Share this question
or