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

Gridview export to ExcelMl filter issue

2 Answers 19 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Jack
Top achievements
Rank 1
Jack asked on 08 Nov 2011, 07:25 PM
Hi, I am having a problem with using the export functionality in telerik gridview. I would really appreciate it if anyone could offer any help.

When I call :

grid.ToExcelML(true, true) //the parameters don't really matter

an <autofilter> tag is automatically tagged to the end of the string output. Is there anyway to disable this?

Because if there is an empty grid, the autofilter would cause a problem when opening the file in excel.

How would I fix this?

Thanks
Jack

2 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 09 Nov 2011, 07:42 AM
Hi Jack,

 This option can be removed if you set ShowColumnHeaders to false for the export options. If your case is different you can export the grid manually by looping grid items and columns similar to this demo

All the best,
Vlad
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Jack
Top achievements
Rank 1
answered on 11 Nov 2011, 03:18 PM
Hey Vlad,

Thank you very much!! I solved my issue!
Tags
GridView
Asked by
Jack
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Jack
Top achievements
Rank 1
Share this question
or