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

    Hi,

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

     

     

     

    </telerik:RadWindow>

     

     

     

    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:
    $(document).ready(

     

     

    function() { 

       showLogOn();

    });

     

     

    function showLogOn() {

     

     

     

    var oWnd = $find("rwinLogOn");

     

     

    oWnd.show();

    }

     

     

    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

    Hi:

    Search for the following, under the this RadWindow section:
    window.radWindow
    or
    window.frameElement.radWindow
    This is in the context of the current RadWindow.  You can find yourself to close or print, etc.
    I would start with:
    http://www.telerik.com/community/forums/aspnet-ajax/window/how-to-print-the-parent-window-from-radwindow.aspx



    Phil
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Georgi Tunev
    Admin
    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.


    Greetings,
    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.
  5. 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