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

RadGridView::ToCSV ignoring the current culture

1 Answer 114 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Sneha
Top achievements
Rank 1
Sneha asked on 11 Jan 2011, 08:04 AM
We are using the ToCSV method on RadGridView to export a grid to excel.

This works fine in most regions, but in germany each record appears in a single cell.

This is because germany uses ";" as the CSV separator by default. The current separator can be found in "CultureInfo.CurrentCulture.TextInfo.ListSeparator"

Is there anyway we can force GridView to use a particular separator?

We are using telerik 2009.2.813.35

<code>
var string = RadGridView1.ToCSV();
WriteStringToFile(string);
</code>

1 Answer, 1 is accepted

Sort by
0
Veselin Vasilev
Telerik team
answered on 11 Jan 2011, 02:43 PM
Hi Sneha,

We introduced a property (ColumnDelimiter and UseSystemCultureSeparator) that controls that in Q1 2010. Please check this help topic for more information.

Kind regards,
Veselin Vasilev
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
Tags
GridView
Asked by
Sneha
Top achievements
Rank 1
Answers by
Veselin Vasilev
Telerik team
Share this question
or