RadWindow is not closing on download button.

2 posts, 0 answers
  1. Sushobhit
    Sushobhit avatar
    26 posts
    Member since:
    Apr 2011

    Posted 22 Jun 2012 Link to this post


    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 

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

    <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() {
                __doPostBack("<%=btnDownLoad.UniqueID %>", "");

    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.
  2. Marin Bratanov
    Marin Bratanov avatar
    4533 posts

    Posted 22 Jun 2012 Link to this post


    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.

    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.
Back to Top