Possible RadScriptManager problem

2 posts, 1 answers
  1. Boris
    Boris avatar
    275 posts
    Member since:
    Oct 2012

    Posted 04 Nov 2013 Link to this post

    I just inherited a legacy system Web app that uses Telerik.  

    I'm not absolutely sure whether this is a Telerik problem or something more basic but I thought I'd start here.

    The code up til now has been maintained and compiled in Visual Studio 2010, Net Framework 4.0
    I'm trying to upgrade to VS2012.  (For the moment I'm keeping it in 4.0)

    The problem is as follows: Every main page has a reference to Telerik and an instance of the RadScriptManager. 
    The way the system works, every page also gets to a point where it instantiates a RadWindow within the main window, which in turn loads an ASPX with a standard ReportViewer control and very little else.  Up till now this has run fine.

    The RadWindow code is as follows:
                    RadWindow rwReportWindow = new RadWindow();
                    rwReportWindow.ID = "RadWindow1";
                    rwReportWindow.NavigateUrl = "ReportViewer.aspx";
                    rwReportWindow.Title = "Report Viewer";
                    rwReportWindow.Visible = true;
                    rwReportWindow.VisibleOnPageLoad = true;
                    rwReportWindow.InitialBehaviors |= WindowBehaviors.Pin;
                    rwReportWindow.InitialBehaviors |= WindowBehaviors.Maximize;
                    rwmReportWindows.Windows.Add(rwReportWindow);

    where rwmReportWindows is a RadWindowManager.

    If I compile and run this in VS2012, when I get to the point where it tries to run the window, it crashes with the message 'The Report Viewer Web Control requires a System.Web.UI.ScriptManager on the web form.

    If I add that basic ScriptManager to ReportViewer.aspx, the reports work, sometimes.  Sometimes the viewer just seems to hang/stay blank/whatever.  

    In conclusion, I'm not sure what I'm dealing with here. 

    Suggestions?

    (I was under the impression that the RadScriptManager and the regular ScriptManager were incompatible, that you couldn't have both on the same page.)

  2. Answer
    Dimitar Terziev
    Admin
    Dimitar Terziev avatar
    1266 posts

    Posted 07 Nov 2013 Link to this post

    Hi Boris,

    The usage of the RadScriptManager and the standard ScriptManager on one and the same page is indeed not possible since there could be only one script manager per page. As for your current problem, when the content of the RadWindow is defined via its NavigateUrl property, this content is loaded in an iframe element via a standard GET request which has nothing to do with the current page. Since the Report Viewer requires a ScriptManager to serve its resources, such should exists on the page. In case you are experiencing problem with the Report Viewer itself, please use the corresponding forum.

    Regards,
    Dimitar Terziev
    Telerik
    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 the blog feed now.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top