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

Access first RadWindow in code behind.

3 Answers 154 Views
Window
This is a migrated thread and some comments may be shown as answers.
Henry
Top achievements
Rank 1
Henry asked on 08 Mar 2013, 02:11 AM
Hi folks,

There is a RadWindowManager in my form and has four windows. How to access the first RadWindow in the Window Manager from code behind?

Thanks.
Henry.

3 Answers, 1 is accepted

Sort by
0
Accepted
Princy
Top achievements
Rank 2
answered on 08 Mar 2013, 04:20 AM
Hello Henry,

Please check the following code to access the first RadWindow in the RadWindowManager.

C#:
//Get a reference to the first window in the list
Telerik.Web.UI.RadWindow firstWindow = WindowManager.Windows[0];

Thanks,
Princy.
0
Alex
Top achievements
Rank 2
answered on 31 Jul 2013, 07:29 PM
is there any way to reference the window by its ID instead of index?
0
Princy
Top achievements
Rank 2
answered on 01 Aug 2013, 06:00 AM
Hi Alex,

You cannot use any property(such as ID) other than the Index to find the RadWindow if you are using the RadWindowManager1.Windows.. statement as shown in the previous post.

Even if you have your RadWindow inside the RadWindowManager, you can access it directly with the help of ID in C# as shown below.

ASPX:
<telerik:RadWindowManager ID="RadWindowManager1" runat="server">
    <Windows>
        <telerik:RadWindow ID="RadWindow1" runat="server">
        </telerik:RadWindow>
        <telerik:RadWindow ID="RadWindow2" runat="server">
        </telerik:RadWindow>
    </Windows>
</telerik:RadWindowManager>

C#:
RadWindow1.NavigateUrl = "http://www.telerik.com";

Thanks,
Princy.
Tags
Window
Asked by
Henry
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Alex
Top achievements
Rank 2
Share this question
or