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

     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;

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


    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> 

    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?


  2. Genady Sergeev
    Genady Sergeev avatar
    1595 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.

    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. DevCraft R3 2016 release webinar banner
Back to Top