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

Problems exporting grid data

3 Answers 32 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Weverton
Top achievements
Rank 1
Weverton asked on 20 May 2011, 08:17 PM
Hi,

I'm getting a problem when I try to export grid data:
  1. The enum values that are displayed normally in grid, using IValueConverter's, after data export are show on the file as object class full namespace (e.g. MyCompany.Domain.DTO.MyClass). I have already tried to use event ElementExporting, but the Value property of GridViewElementExportingEventArgs never brings the enum to me; it brings the full object on enum columns.

Please se the two attached images: the file generated by GridView and the expected file.

Thanks,

3 Answers, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 25 May 2011, 11:53 AM
Hi Weverton,

 I have tried to reproduce the behavior that you are experiencing. I am binding a GridViewDataColumn to an enum property and I am using a converter to change its value.
Unfortunately I was not able to get exported the original value instead of the converted one.

I have prepared a sample project that contains a column Position that is bound to an enum property. I have added a EnumConverter.cs and I have a Export button for exporting to Csv.

Would you please review the project and change it accordingly, so that the specified wrong behavior occurs? That way we could investigate it further.

Best wishes,
Didie
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
Weverton
Top achievements
Rank 1
answered on 25 May 2011, 07:23 PM
Hi,

There is a difference between your example and my case: I use CellTemplate. How can I do in this case??

Thanks,
0
Vlad
Telerik team
answered on 26 May 2011, 06:58 AM
Hi,

 You need to handle ElementExporting event and set e.Value. Please refer to our exporting demo

Kind regards,
Vlad
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
Tags
GridView
Asked by
Weverton
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
Weverton
Top achievements
Rank 1
Vlad
Telerik team
Share this question
or