Getting a reference of a RadWindow

4 posts, 0 answers
  1. mvbaffa
    mvbaffa avatar
    102 posts
    Member since:
    Dec 2006

    Posted 22 May 2009 Link to this post


    I am trying to get a reference of a RadWindow but the $find returns null on form load. My radwindow is like this:
     < telerik:RadWindow ID="rwinLogOn" Title="asset Toolbox - LogOn" runat="server"



    NavigateUrl="LogOn.aspx" Behavior="None" IconUrl="img/userGroup.png"




    VisibleStatusbar="False" DestroyOnClose="True"




    OnClientClose="onClientClose" Modal="False" Skin="Black" Height="160"




    Width="230" AutoSize="True" style="display: none">








    It is a logon window and must be opened at the start of the application. When the first form is opened. I am using jQuery and I have a ready event like this:



    function() { 





    function showLogOn() {




    var oWnd = $find("rwinLogOn");






    The oWnd variable in showLogOn is allways returning "null" at the form load. To check if the problem was really because of the form load event I put a button in the main form like this:
    <input id="btnShow" type="button" value="show window" onclick="showLogOn(); return false;" />




    When the form is loaded normally and I press the button above the RadWindow is showned without any problems. So the problem is really because the RadWidown is not avaiable at the jQuery ready event.

    I tried to call showLogOn() in the Body onLoad and OnInit events and it did not worked. The curious thing is that all other html tags can be accessed normally in the jQuery ready event. But the RadWindow is only avaiable after the page is displayied.

    I need to know which event I must drive to access the radWindow after the form is completelly loaded.

    Thanks in advance.


  2. Phil
    Phil avatar
    273 posts
    Member since:
    Jul 2008

    Posted 24 May 2009 Link to this post


    Search for the following, under the this RadWindow section:
    This is in the context of the current RadWindow.  You can find yourself to close or print, etc.
    I would start with:

  3. Georgi Tunev
    Georgi Tunev avatar
    7207 posts

    Posted 25 May 2009 Link to this post

    Hi Phil,

    If you want to use JavaScript to open the window, I suggest using ASP.NET AJAX's pageLoad() function - it is automatically fired when all ASP.NET AJAX controls are loaded on the page. Note that the ASP.NET AJAX controls are loaded on a later stage in page's life cycle (after window.onload is fired), in the Sys.Application.Load() event.
    As an alternative you could simply set the VisibleOnPageLoad property of the RadWindow to true - this way once the control is loaded on the page, the RadWindow will automatically be displayed.

    Georgi Tunev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  4. mvbaffa
    mvbaffa avatar
    102 posts
    Member since:
    Dec 2006

    Posted 25 May 2009 Link to this post

    Thanks I will try it out    
Back to Top