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

Wrong Currency Format

1 Answer 124 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Noel Rice
Top achievements
Rank 1
Noel Rice asked on 10 Apr 2009, 04:43 PM
When setting the FormatString property of a GridViewDecimalColumn to "{0:c}", the output shows a boxlike symbol rather than the dollar sign. The FormatInfo property of the column is "Default". The current culture on the machine is en-US. If I set the FormatInfo specifically to "en-US", the column formats properly with the expected "$". 

I am using version 2009.1.9.311 and the data is the supplied AdventureWorks database, SalesPerson table, SalesQuota column.

thank you,
-Noel

1 Answer, 1 is accepted

Sort by
0
Nick
Telerik team
answered on 13 Apr 2009, 02:26 PM
Hi Noel Rice,

Thank you for contacting us. To work-around this you may set the property FormatInfo to the current culture using the code below instead of setting it to the default culture:

  form.Grid.MasterGridViewTemplate.Columns[0].FormatInfo = CultureInfo.CurrentCulture;  

Do not hesitate to write me back if you have further questions.

Kind regards,
Nick
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
Tags
GridView
Asked by
Noel Rice
Top achievements
Rank 1
Answers by
Nick
Telerik team
Share this question
or