RadUpload and progressarea in radwindow popup

Thread is closed for posting
2 posts, 0 answers
  1. Samir
    Samir avatar
    8 posts
    Member since:
    Jul 2009

    Posted 02 Dec 2010 Link to this post

    Hi
     I have radupload in a parent page like

    <script type="text/javascript">
        function OpenProgressWindow() {
            if (document.all)//IE browser
            {
                win = radopen("ProgressBar.aspx", "RadWindow1");
            }
            else {
                window.setTimeout(function () {
                    radopen("ProgressBar.aspx", "RadWindow1");
                }, 0);
            }
        }
        function OnClientClose(radWindow) {
            var oArea = radWindow.GetContentFrame().contentWindow.RadProgressArea1;
            oArea.CancelRequest();
        }          
    </script>   

    <body>
        <form id="form1" runat="server">
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server"></telerik:RadScriptManager>
        <div>
            <telerik:radprogressmanager id="RadProgressManager1" runat="server"      
                    onclientprogressstarted="OpenProgressWindow">     
                </telerik:radprogressmanager>    
                <telerik:radupload id="RadUpload1" runat="server" maxfileinputscount="1"></telerik:radupload>    
                <telerik:radwindowmanager id="RadWindowManager1" runat="server" showcontentduringload="true"    
                    onclientclose="OnClientClose">     
                    <windows>    
                        <telerik:radwindow id="RadWindow1" runat="server" width="500px" height="400px"      
                            navigateurl="ProgressBar.aspx" title="" />    
                    </windows>    
                </telerik:radwindowmanager>               
            </div>    
            <asp:button id="Button1" runat="server" text="Button" />    

        </form>
    </body>

    and the radwindow popup has :
     <form id="form1" runat="server">
             <telerik:RadScriptManager ID="RadScriptManager1" runat="server"></telerik:RadScriptManager>       
    <telerik:radprogressmanager id="RadProgressManager1"       runat="server"></telerik:radprogressmanager> 
    <telerik:radprogressarea id="RadProgressArea1" runat="server" DisplayCancelButton="True"></telerik:radprogressarea> 
      </form>   

    and code behind for popup in page load is :
    Page.ClientScript.RegisterStartupScript(Me.GetType(), "RegisterProgressArea", String.Format("function GetRadWindow(){{if (window.radWindow) return window.radWindow; else if (window.frameElement.radWindow) return window.frameElement.radWindow; return null;}} var radWindow = GetRadWindow();if (radWindow != null){{var progressAreasArray = radWindow.BrowserWindow.RadUploadNameSpace.ProgressAreas;progressAreasArray[progressAreasArray.length] = {0};}}", RadProgressArea1.ClientID), True)


    i am getting js error saying RadUploadNameSpace as null in the script above, any ideas?

    Thanks
     

  2. Genady Sergeev
    Admin
    Genady Sergeev avatar
    1596 posts

    Posted 08 Dec 2010 Link to this post

    Hi Samir,

    RadUploadNameSpace was used in the classic controls, it is not available in the AJAX controls, which I presume, you use. As an attachment you can find sample project showing how to use RadProgressArea inside a RadWindow. I suggest that you follow the approach shown there.

    Greetings,
    Genady Sergeev
    the Telerik team
    Browse the vast support resources we have to jumpstart your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top