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

RadGridView Excel Export Empty Column

2 Answers 76 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Martin
Top achievements
Rank 1
Martin asked on 02 Mar 2011, 12:01 AM
Even when setting e.Cancel = True in the ElementExporting event for Cell and HeaderCell Elements for columns that I do not want exported, I still get an empty column in the exported file when using an export to ExcelML. If you look at the xml generated you can see the column still exists in the column definitions row:

<Table>
<Column ss:Width="30"></Column><Column ss:Width="92"></Column><Column ss:Width="90"></Column><Column ss:Width="68"></Column><Column ss:Width="60"></Column><Column ss:Width="104"></Column><Row>
<Cell ss:Index="2"><Data ss:Type="String">First Name</Data></Cell><Cell ss:Index="3"><Data ss:Type="String">Last Name</Data></Cell><Cell ss:Index="4"><Data ss:Type="String">Logon</Data></Cell><Cell ss:Index="5"><Data ss:Type="String">Active</Data></Cell><Cell ss:Index="6"><Data ss:Type="String">Last Modified</Data></Cell></Row>
...

How do I resolve this? Thank you..

Marty

2 Answers, 1 is accepted

Sort by
0
Accepted
Vlad
Telerik team
answered on 02 Mar 2011, 09:02 AM
Hi Martin,

 Please use IsVisible column property to remove a column from the exported output completely. 

Regards,
Vlad
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
0
Luc
Top achievements
Rank 1
answered on 23 May 2011, 09:34 AM
I too have the same issue (silverlight Q1 2011),
What i need is not to hide the column from the grid as achieved by IsVisible=false
I only need it gone from the ExcelML export.

How do we go on to achieve this?
Tags
GridView
Asked by
Martin
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Luc
Top achievements
Rank 1
Share this question
or