On Export Grid to Excel I get Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerServerErrorException

4 posts, 0 answers
  1. Jack Voss
    Jack Voss avatar
    27 posts
    Member since:
    May 2010

    Posted 05 Jul 2011 Link to this post

    When I attempt to export my master grid ( in a nested grid view) I get the following error in Telerik.Web.UI

    "Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerServerErrorException: Object reference not set to an instance of an object."

    Has anyone else run into this issue ?

    I configure the export as follows :

    grdCMT.ExportSettings.ExportOnlyData =

     

    true;

     

    grdCMT.ExportSettings.IgnorePaging =

     

    true;

     

    grdCMT.ExportSettings.OpenInNewWindow =

     

    true;

     

    grdCMT.ExportSettings.HideStructureColumns =

     

    true;

     

    grdCMT.ExportSettings.FileName = lstrFileName;

    Is it possible this is being caused because I am using RadWindows?


  2. Daniel
    Admin
    Daniel avatar
    4943 posts

    Posted 05 Jul 2011 Link to this post

    Hello Jack,

    I suppose there are two issues here:

    1) Exporting with AJAX enabled:
    Export from ajaxified grid

    2) Nested control is removed because of the export settings. Please try to (for testing purposes) set IgnorePaging and ExportOnlyData to false.

    Best regards,
    Daniel
    the Telerik team

    Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Jack Voss
    Jack Voss avatar
    27 posts
    Member since:
    May 2010

    Posted 06 Jul 2011 Link to this post

    Hi Daniel,

    I added the following to my Page_Load on the page :
    ScriptManager.GetCurrent(Page).RegisterPostBackControl(btnExport);

    The grid is now exporting.  But it only exports the first 50 rows of a 94 row dataset, which is the number of rows the grid is set to display.  I cannot seem to get it to export the entire data set.

    I've done the following :
    Set IgnorePaging and ExportOnlyData to false
    Set IgnorePaging and ExportOnlyData to true
    Set IgnorePaging to true and ExportOnlyData to false
    Set IgnorePaging to false and ExportOnlyData to true

    If any one has any other ideas, I would appreciate it. 

    Thank you
  5. Daniel
    Admin
    Daniel avatar
    4943 posts

    Posted 12 Jul 2011 Link to this post

    Hello Jack,

    Please make sure that you use advanced data-binding or a datasource control.
    Advanced Data-binding (using NeedDataSource event)

    As to the RegisterPostBackControl approach - we don't recommend that you use this method if you use Telerik AJAX controls (RadAjaxPanel, RadAjaxManager).
    In this case, I suggest that you cancel the AJAX request as explained in the Export from ajaxified grid help topic.

    Regards,
    Daniel
    the Telerik team

    Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

Back to Top