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

WindowCollection Compatibiliity issue

1 Answer 32 Views
Window
This is a migrated thread and some comments may be shown as answers.
Andrea Del Brocco
Top achievements
Rank 1
Andrea Del Brocco asked on 16 Feb 2010, 02:57 PM
 
WMPagina is a Rad window manager 

var wlogin = WMPagina.Windows.Find(delegate(RadWindow w) { return w.ID == "LoginWindow"; });  
                wlogin.AutoSize = true;  
                wlogin.VisibleOnPageLoad = true;  
                

I in Q2 version of telerik ajax control i'll be able to find a radwindow by id, now the collection does not expose the find method.

How can i correct this?

obviously i can iterate wit a for each but it is possible to have a quick way the same result??

Thanks
Andrea Del brocco

1 Answer, 1 is accepted

Sort by
0
Svetlina Anati
Telerik team
answered on 19 Feb 2010, 08:52 AM
Hello Andrea,

We have changed the implementation in this manner in order to provide ViewState support for the Windows collection because there was not such. With the version you are using in order to achieve what you need you can indeed iterate through the windows in the Windows collection to find your window or e.g save its index in the Session object and get it by index.

In the Beta release, however, the RadWindows are already added to the Controls collection of the RadWindowManager and thus if you upgrade to it, you can directly reference the RadWindow by using the FindControl method as shown below:

var wlogin = WMPagina.FindControl("LoginWindow") as RadWindow; 
                wlogin.AutoSize = true;   
                wlogin.VisibleOnPageLoad = true;   
                  

The FindControl method solution will work with every later release than the Beta as well.

Kind regards,
Svetlina
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
Andrea Del Brocco
Top achievements
Rank 1
Answers by
Svetlina Anati
Telerik team
Share this question
or