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

Formatting Numbers By Culture

2 Answers 18 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Luke Daugherty
Top achievements
Rank 1
Luke Daugherty asked on 13 Mar 2014, 01:31 PM
Sorry if this is answered elsewhere, but I have combed the forum, and doc and not found an exact answer. For dates this was easy. I just set the columns DataFormatString to Thread.CurrentThread.CurrentCulture.DateTimeFormat.LongTimePattern. But the Thread.CurrentThread.CurrentCulture.NumberFormat does not appear to have any complete patterns that can be used here. All I want is something like 1.234 displaying as 1,234 if the CurrentCulture's format decimal place is comma.

Also, why isn't this automatic? I did nothing to get ListView to display correctly. Why wouldn't the default behavior use the Culture's format for each type given to the column and save the user the trouble...

Thanks,
Luke Daugherty

2 Answers, 1 is accepted

Sort by
0
Yoan
Telerik team
answered on 18 Mar 2014, 08:37 AM
Hello Luke,

The formatting of RadGridView is language specific. In order to have the current culture settings respected, you can set the IsLocalizationLanguageRespected property of RadGridView to False. Please check this help article for a further reference.

Regards,
Yoan
Telerik
 

DevCraft Q1'14 is here! Watch the online conference to see how this release solves your top-5 .NET challenges. Watch on demand now.

 
0
Luke Daugherty
Top achievements
Rank 1
answered on 18 Mar 2014, 03:45 PM
Thanks.
Tags
GridView
Asked by
Luke Daugherty
Top achievements
Rank 1
Answers by
Yoan
Telerik team
Luke Daugherty
Top achievements
Rank 1
Share this question
or