Devexpress spin - culture info

3

I'm using the spinedit of devexpress, with MVC, it's a decimal field, but I need the punctuation of the number to be a period and not a comma, I need to put his culture as "en-US", how to do it? / p>     

asked by anonymous 11.08.2014 / 15:01

2 answers

2

If the spinedit components are using the .Net standard, just change, preferably for the entire execution of the site, in global.asax:

CultureInfo culture = CultureInfo.GetCultureInfo("en-US");
Thread.CurrentThread.CurrentUICulture = culture;
Thread.CurrentThread.CurrentCulture = culture;
    
11.08.2014 / 19:51
0

Depends on the Type of Application. If it is WindowForms, just the following:

Thread.CurrentThread.CurrentCulture = New CultureInfo("pt-BR")
Thread.CurrentThread.CurrentUICulture = New CultureInfo("pt-BR")

If it is WPF add:

FrameworkElement.LanguageProperty.OverrideMetadata(
  GetType(FrameworkElement), 
  New FrameworkPropertyMetadata(XmlLanguage.GetLanguage(CultureInfo.CurrentCulture.IetfLanguageTag)))

Do not forget Imports

Imports System.Globalization
Imports System.Threading
Imports System.Windows.Markup
    
07.04.2017 / 21:02