I can't get .close() to run for radwindow

2 posts, 0 answers
  1. mmarchev
    mmarchev avatar
    1 posts
    Member since:
    Oct 2011

    Posted 05 May 2015 Link to this post

    function onClickHandler(e) {
        var targedNodeName = e.target;
        var radwindow1 = ('#RadWindow1');
     
        if (radwindow1[0] != null) {
            if ($telerik.isMouseOverElementEx(radwindow1[0], e)) return;
               $telerik.
            // $telerik.close(radwindow1[0]);
            //$telerik.close(radwindow1);
            //radwindow1.close();
            radwindow1[0].close();
             
        }
    I have tried several ways to close the radwindow that I draw dynamically from .cs code;

     

    Here is my java script:

     

    and my cs code:

    RadWindowManager windowManager = new RadWindowManager();
    windowManager.ID="RadWindowManager1";
    RadWindow widnow1 = new RadWindow();
     
    // Set the window properties   
    widnow1.NavigateUrl = "Detail.aspx" + "?event_id=" + rb.CommandArgument;
    widnow1.ID = "RadWindow1";
    widnow1.CssClass = "rdWindow1";
    widnow1.Behaviors = WindowBehaviors.Close;
    widnow1.Modal = true;
    widnow1.Width = 600;
    widnow1.Height = 740;
    widnow1.VisibleOnPageLoad = true; // Set this property to True for showing window from code   
    windowManager.Windows.Add(widnow1);
    this.form1.Controls.Add(widnow1);

     

     

    Its failing to do .close() even though I do find the control.  Complaining that object doesn't have .close().

     

    Thanks

     

  2. Magdalena
    Admin
    Magdalena avatar
    421 posts

    Posted 06 May 2015 Link to this post

    Hi,

    There is no server side close() method of RadWindow control. The close() method is a client side function which works properly at our side. As the provided code was not runnable, we have make some modification and have applied to a sample tested project. You can find the project in the attachment. After clicking the button "Close all Windows", the all instances of the control are closed.

    If the issue still occurs on your side, could you please open a support ticket so you will be able to provide us with a runnable sample project where the issue is reproduced?

    Regards,
    Magdalena
    Telerik
     

    See What's Next in App Development. Register for TelerikNEXT.

     
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top