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
190
Culture not applied
posted

Hi I have creating WebCurrencyEdit and WebDateTimeEdit dynamically, it´s used in a UltraWebGrid. I allow the user to edit values but my culture isn't respected.

Example:

            WebCurrencyEdit currencyEditControl = new WebCurrencyEdit();
            currencyEditControl.ID = "MyControlID";
            currencyEditControl.Culture = Thread.CurrentThread.CurrentCulture;
            currencyEditControl.DataMode = NumericDataMode.Text;
            currencyEditControl.NumberFormat = MyNumericFormatInfo.NumericFormatInfo;
            currencyEditControl.MinDecimalPlaces = MinDecimalPlaces.Two;
            column.EditorControlID = "MyControlID";

Tanks

Version: 8.2.20082.1000

Parents
  • 190
    posted

    Any help? Decimal separator not respected when editor in UltraWebGrid.

            NumberFormatInfo nfi = new NumberFormatInfo();
            nfi.NumberDecimalDigits = 2;
            nfi.NumberDecimalSeparator = ",";
            nfi.NumberNegativePattern = 1;
            nfi.NumberGroupSeparator = ".";
            nfi.CurrencyDecimalDigits = 2;
            nfi.CurrencyDecimalSeparator = ",";
            nfi.CurrencyNegativePattern = 2;
            nfi.CurrencySymbol = "R$ ";
            nfi.CurrencyGroupSeparator = "."; 


            WebCurrencyEdit currencyEditControl = new WebCurrencyEdit();
            currencyEditControl.ID = "MyEditor"
            currencyEditControl.Culture = CultureInfo.CreateSpecificCulture("pt-BR");
            currencyEditControl.NumberFormat = nfi;

     

Reply Children
No Data