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

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

1 Answer 35 Views
Window
This is a migrated thread and some comments may be shown as answers.
mmarchev
Top achievements
Rank 1
mmarchev asked on 05 May 2015, 09:47 PM

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

 

1 Answer, 1 is accepted

Sort by
0
Magdalena
Telerik team
answered on 06 May 2015, 12:55 PM
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.

 
Tags
Window
Asked by
mmarchev
Top achievements
Rank 1
Answers by
Magdalena
Telerik team
Share this question
or