Hi,
I'm developing an application using WebNumericEditors. I know how to prevent the thousands seperator from showing; applying a custom NumberFormatInfo to the editor overwriting the default one. But I really don't want to do this for each control, with the BIG possibility of overlooking one. Is there a way of applying a global numberformat to all WebNumericEditors or maybe specifying a resource or theme to fix this? I tried the theme solution, but since this isn't a real property of the editor that won't work unfortunately (as far as I know). I also found a solution on this form applying a custom numberformat object to the current running thread (using the Application_Start app.config function), but that doesn't work for some reason.
I'm using 8.2 build 2022 of the ASP.NET suite.
WebNumericEdit and others have extra option to customize culture on level of a paticular instance of control. Otherwise culture of current thread is used.
Hi Viktor,
I think (but I haven't verified this yet) that setting the culture in web.config overrides the culture you specify in, for instance, the application_load event in global.asax. When you override the culture in each seperate page again it'll probably work, but that's not what I want.
So I'll check which event in global.asax is suitable for overriding for this purpose. In the meanwhile, you guys could also provide users with a nicer way to do this, a web.config configuration key or something like that.
I am not sure why currentthread does not work for you. You may put codes in any page event before prerender. The best is within OnLoad.
System.Globalization.CultureInfo ci = System.Globalization.CultureInfo.CreateSpecificCulture("en-US");// set your properties for ciSystem.Threading.Thread.CurrentThread.CurrentCulture = ci;
You may look at sample applications related to culture. For example, CultureFormats.aspx.cs and CustomFormats.aspx.cs.