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

How to close radwindow completely

2 Answers 436 Views
Window
This is a migrated thread and some comments may be shown as answers.
Hamza
Top achievements
Rank 1
Hamza asked on 12 Nov 2011, 02:57 AM
hi all :)

I open some video at a radwindow, but after closing, the video still working

how can I close the window and all controls inside it ?

if I can to have another question, can I show radwindow without any border ?

just like popup one



thank you all :)

2 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 14 Nov 2011, 04:59 AM
Hello Hamza,

Try the following code snippet to close the RadWindow. You need to inject the javascript function to the asp label as it's text and write the client side code to close the RadWindow as shown below in order to close the RadWindow.

JS:
<script language ="javascript" type ="text/javascript" >  
    function GetRadWindow()     
        {     
            var oWindow = null;     
            if (window.radWindow)
                oWindow = window.RadWindow; //Will work in Moz in all cases, including clasic dialog     
            else if (window.frameElement.radWindow)
                oWindow = window.frameElement.radWindow;//IE (and Moz as well)     
            return oWindow;               
        }     
      
        function Close()     
        {     
              GetRadWindow().Close();          
        }         
</script>

ASPX:
<asp:Label ID="Label1" Runat="server" Width="410px"></asp:Label>

C#:
protected void btn_Click(object sender, EventArgs e)   
{   
  Label1.Text = "<script type='text/javascript'>Close()</" + "script>";   
}

To remove border from RadWindow you can take a look into the following forum thread which discussed the same.
Remove the window border
Window without border

Thanks,
Princy.
0
Marin Bratanov
Telerik team
answered on 15 Nov 2011, 10:23 AM
Hello Hamza,

Let me suggest another option. Please examine this help article: http://www.telerik.com/help/aspnet-ajax/radwindow-troubleshooting-common.html and more precisely the first section (Video / audio keep playing after window is closed) as it describes your exact issue and offers two ways to cope with it.


Regards,
Marin
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Tags
Window
Asked by
Hamza
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Marin Bratanov
Telerik team
Share this question
or