public static Column BindReadOnlyColumn(Column column)
        {
            column.Formatter = Formatter;
            NumberFormatInfo numberFormatInfo = NumberEx.GetCurrencyEditFormatInfo();

            column.Options = numberFormatInfo;
            return(column);
        }
        public static Column BindColumn(Column column, int minValue, int maxValue)
        {
            column.Editor    = MoneyEditor;
            column.Formatter = Formatter;
            NumberFormatInfo numberFormatInfo = NumberEx.GetCurrencyEditFormatInfo();

            numberFormatInfo.MinValue = minValue;
            numberFormatInfo.MaxValue = maxValue;
            column.Options            = numberFormatInfo;
            return(column);
        }
Esempio n. 3
0
        private static NumberFormatInfo GetNumberFormatInfo(Func <System.Collections.Dictionary> allBindingsAccessor)
        {
            NumberFormatInfo format = NumberEx.GetCurrencyEditFormatInfo();


            if ((Number)allBindingsAccessor()["minvalue"] == null)
            {
                format.MinValue = -2147483648;
            }
            else
            {
                format.MinValue = (Number)allBindingsAccessor()["minvalue"];
            }

            if ((Number)allBindingsAccessor()["maxvalue"] == null)
            {
                format.MaxValue = 2147483647;
            }
            else
            {
                format.MaxValue = (Number)allBindingsAccessor()["maxvalue"];
            }
            return(format);
        }