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

Error: Excel Export Error: 'this.ColGroup.Cols' is null or not an object

1 Answer 128 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Chanan Zass
Top achievements
Rank 1
Chanan Zass asked on 21 May 2010, 05:26 PM
Greetings,

We've encountered a problem when trying to export grid data in Excel format.
The error we get is always:

 

Error: 'this.ColGroup.Cols' is null or not an object 
This is what we get when we enable the ShowExportToExcelButton.

Just for testing purposes, we created a button OUTSIDE the grid and placed this code in the CodeFile:
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click  
        RadGrid1.MasterTableView.ExportToExcel()  
End Sub 
This works without a problem.

Any clue?

1 Answer, 1 is accepted

Sort by
0
Chanan Zass
Top achievements
Rank 1
answered on 21 May 2010, 06:03 PM
Please ignore my earlier question.
Should have read the manual before asking (again).

Reason for this error is probably due to the fact that "Generally speaking, the exporting feature of the control work with regular postbacks only."
Our grid is ajaxified, of course.
To read more about this problem, see here: http://www.telerik.com/help/aspnet-ajax/grdexportwithajax.html

Tags
Grid
Asked by
Chanan Zass
Top achievements
Rank 1
Answers by
Chanan Zass
Top achievements
Rank 1
Share this question
or