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

RadWindow is not closing on download button.

1 Answer 92 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Sushobhit
Top achievements
Rank 2
Sushobhit asked on 22 Jun 2012, 09:21 AM
Hi,

I have asked one question that

"I  have open a RadWindow on a button click event and then in that window i have added a download button for downloading the file.
But as the download pop up the radwindow stop behaving. Right now i want that RadWindow should get close automatically  when the download gets completed but currently it remains open. So please provide me solution for this.
"

and Telerik provide me this answer 

Cs:
<asp:Button runat="server" ID="btnDownLoad" Text="DownLoad" OnClientClick="CloseDialog();return false;" OnClick="btnDownLoad_Click" />

Aspx
<script type="text/javascript">
        function GetRadWindow() {
            var oWindow = null;
            if (window.radWindow) oWindow = window.radWindow;
            else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;
            return oWindow;
        }
        function CloseDialog() {
            GetRadWindow().close();
            __doPostBack("<%=btnDownLoad.UniqueID %>", "");
        }
</script>


But after applying this solution i am getting this problem:

"after using this on the onclientclick on Download button the radwindow gets close before the download begins."

So, Please tell me any other solution so that user can download and radwindow gets close after that.

1 Answer, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 22 Jun 2012, 10:44 AM
Hi,

Allow me to start by pointing out that the suggestion did not come from our team, as the forums are a community resource. I have just answered your other thread and I have given there the information about this scenario. You can follow this link for my answer. Logic that can close a regular browser window could be used to close a RadWindow, so if you can close a browser popup closing a RadWindow will only be different in the way a reference is obtained.

Greetings,
Marin Bratanov
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
General Discussions
Asked by
Sushobhit
Top achievements
Rank 2
Answers by
Marin Bratanov
Telerik team
Share this question
or