Hi;
I need to export the content of a grid as a flat CSV where each column is separated a coma {,} without the addition of Double quote "..." around each column. How can I tell the RADGridView not to add the Double Quote?
Thanks!
..Ben
I need to export the content of a grid as a flat CSV where each column is separated a coma {,} without the addition of Double quote "..." around each column. How can I tell the RADGridView not to add the Double Quote?
Thanks!
..Ben
4 Answers, 1 is accepted
0
Hello ..Ben,
Yavor Georgiev
the Telerik team
There is a good reason why columns have quotes around them, and that's because there's no guarantee that the cell delimiter won't be part of a data cell (for instance, if your delimiter is a comma and you're exporting numbers formatted for some European culture, whose decimal point is actually a decimal comma).
However, you can still get rid of the quotes very easily. Instead of exporting directly to a FileStream, export to a MemoryStream, read that into a string, strip all quotes, then save the resulting string in the FileStream. It is a little roundabout, I know, but we do not plan to allow exporting without quotes.
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

Ben Hayat
Top achievements
Rank 2
answered on 27 Jul 2010, 02:26 PM
Hi Yavor;
I agree 100% to delimit the fields with double quotes. That's how I've used it in many platforms, however this CSV file is a source file to an outside (command line) software that users uses for their operation and that software does not support the double quote.
Any chance you can provide a sample with the solution you offered?
Thanks!
I agree 100% to delimit the fields with double quotes. That's how I've used it in many platforms, however this CSV file is a source file to an outside (command line) software that users uses for their operation and that software does not support the double quote.
Any chance you can provide a sample with the solution you offered?
Thanks!
0
Accepted
Hello ..Ben,
Yavor Georgiev
the Telerik team
Please find attached a sample solution.
Best wishes,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

Ben Hayat
Top achievements
Rank 2
answered on 27 Jul 2010, 02:50 PM
Thank you very much for speedy response Yavor!
..Ben
..Ben