WindowCollection Compatibiliity issue

2 posts, 0 answers
  1. Andrea Del Brocco
    Andrea Del Brocco avatar
    11 posts
    Member since:
    Jan 2003

    Posted 16 Feb 2010 Link to this post

    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??

    Andrea Del brocco
  2. Svetlina Anati
    Svetlina Anati avatar
    2795 posts

    Posted 19 Feb 2010 Link to this post

    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,
    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.
Back to Top