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

ToCsv and column headers

2 Answers 32 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Geoff Smith
Top achievements
Rank 1
Geoff Smith asked on 23 Sep 2010, 05:25 PM
Hi,

I'm using the ToCsv method on the grid view. Some of my headers in that grid are TextBlock's (so that I can add a tooltip), i.e:

<Controls:GridViewDataColumn.Header>
    <TextBlock ToolTip="Product Quantity">Prod Qty</TextBlock>
</Controls:GridViewDataColumn.Header>

However, when in the CSV text, the column shows up as "System.Windows.Controls.TextBlock" as I guess it's just doing a ToString on whatever the column header is. Is there a way to change what is used by ToCsv to name headers?

2 Answers, 1 is accepted

Sort by
0
Accepted
Yavor Georgiev
Telerik team
answered on 23 Sep 2010, 05:36 PM
Hi Geoff Smith,

 You need to handle the ElementExporting event and replace the header values with your own.

Sincerely yours,
Yavor Georgiev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Geoff Smith
Top achievements
Rank 1
answered on 24 Sep 2010, 08:30 AM
Nice, thanks Yavor!
Tags
GridView
Asked by
Geoff Smith
Top achievements
Rank 1
Answers by
Yavor Georgiev
Telerik team
Geoff Smith
Top achievements
Rank 1
Share this question
or