Devexpress spin - culture info


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


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

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:

  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