This is a migrated thread and some comments may be shown as answers.

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

3 Answers 39 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jack Voss
Top achievements
Rank 1
Jack Voss asked on 05 Jul 2011, 08:50 PM
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?


3 Answers, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 05 Jul 2011, 09:43 PM
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!

0
Jack Voss
Top achievements
Rank 1
answered on 06 Jul 2011, 09:14 PM
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
0
Daniel
Telerik team
answered on 12 Jul 2011, 12:06 PM
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!

Tags
Grid
Asked by
Jack Voss
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Jack Voss
Top achievements
Rank 1
Share this question
or