Can’t open RadWindow from Master/Content page.

3 posts, 1 answers
  1. Thomas
    Thomas avatar
    6 posts
    Member since:
    Dec 2008

    Posted 06 Feb 2010 Link to this post

    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,

    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 ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">      
     <telerik:RadWindowManager ID="RadWindowManager1" runat="server"   
                    <telerik:RadWindow ID="rdWnd" runat="server" Behavior="Default"   
                        InitialBehavior="None" Left="" NavigateUrl="Sample1.aspx"   
                        OpenerElementID="LinkButton1" Top="" ReloadOnShow="True" Visible="True"   
                        EnableViewState="True" > 
        <asp:LinkButton ID="LinkButton1" runat="server">LinkButton</asp:LinkButton> 

  2. Answer
    Georgi Tunev
    Georgi Tunev avatar
    7207 posts

    Posted 08 Feb 2010 Link to this post

    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 %> "

    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.
  3. saeed
    saeed avatar
    4 posts
    Member since:
    Nov 2007

    Posted 06 Oct 2012 Link to this post


    add this line to page_load method

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

Back to Top