In the grid it shows $ is there any way i can show Euro, and i wanted to change thsi dynamically.
regardsPeter
Hello Peter,
The currency is set by the culture. You can change this programmatically by using the following code.
System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("de-DE");
de-DE is the culture info name (I chose German because it would show a Euro).
Note that this will also affect things like date formats and number formatting.
Let me know if you have any other questions about this.
Elizabeth AlbertLocalization Engineer
Thank you, This changes all the format in a page, is there any way i can change only the currency in the Grid alone. To achieve this, is there any work around.
You can set the FormatString on the column.
For example, I modified the Formatting Data sample to use the following FormatString:
<ig:TextColumn Key="Price" FormatString="{}{0:N}€">
I also found some general .NET information on NumberFormatInfo. You could set the CurrencySymbol.
I would try setting the FormatString on the column as the easiest solution.
In the code behind you can use the following line:
((TextColumn)this.dataGrid.Columns.DataColumns["Price"]).FormatString = "{0:N}€";
Can i do this using code behind during run time, for example i have a seperate combo box where in which i list the currency, based on the user selection it should change the currency of the grid.