如何将Radvindow从内容页面添加到母版页中的RadWindowManager?

时间:2012-05-25 15:54:42

标签: ajax telerik radwindow

我在MasterPage(MasterPage.aspx)中有RadWindowManager:

<telerik:RadWindowManager ID="MasterRadWindowManager" runat="server" VisibleStatusbar="false"
        DestroyOnClose="false">

    </telerik:RadWindowManager>

如何将ContentPage(Default.aspx)中的RadWindow添加到MasterPage中的RadWindowManager?

1 个答案:

答案 0 :(得分:2)

RadWindow:

RadWindow radwindowNews = new RadWindow();
radwindowNews.ID = "RadWindow1";
radwindowNews.Width = 820;
radwindowNews.Height = 600;
radwindowNews.Modal = true;
radwindowNews.ReloadOnShow = true;
radwindowNews.AutoSize = false;
radwindowNews.ShowContentDuringLoad = false;
radwindowNews.Behaviors = WindowBehaviors.Close;

添加RadWindow:

RadWindowManager radManager =
    (RadWindowManager)this.Master.FindControl("MasterRadWindowManager");
radManager.Windows.Add(radwindowNews);