Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
780
use DataFormatString to view for userA 10.000,00 and for userB 10,000.00
posted

Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4

I’m working with a WebDataGrid v10.3. The users of my application has a property for “formatting the numbers”. Well I only find the DataFormatString of a Infragistics.Web.UI.GridControls.BoundDataField but the DataFormatString use ,for example, {0:N2} so ¿How can I establish with DataFormatString for user1 this format 10.000,00 and for user2 another format 10,000.00?

 

Note: I find that the NumericFieldEditor has access to the Culture, so when I’m editing I see want I need.

  • 780
    Offline posted

    Hi.

    Changing the Culture for the thread and the NumberFormat.NumberDecimalSeparator and the NumberFormat.NumberGroupSeparator

    Threading.Thread.CurrentThread.CurrentCulture = New Globalization.CultureInfo()

    Threading.Thread.CurrentThread.CurrentCulture.NumberFormat.NumberDecimalSeparator = "."

    Threading.Thread.CurrentThread.CurrentCulture.NumberFormat.NumberGroupSeparator = ","

    I see 10,0000.00

    and if I use …NumberDecimalSeparator = "," and …NumberGroupSeparator = "."

    I see 10.000,00

    But numericeditor not work if I set the comma as NumberDecimalSeparator. Instance of seeing in edit mode 12.345,67 I see 1234567.

    Does anyone know how to handle numericeditor to work with the comma?