Eidt Value setting
        /// <summary>
        /// Set SpinEdit integer format.
        /// </summary>
        /// <param name="editControl">SpinEdit Control</param>
        /// <param name="minValue">Min Value</param>
        /// <param name="maxValue">Max Value</param>
        public static void SetIntegerFormat(this SpinEdit editControl, int minValue, int maxValue) {
            if (editControl == null)
                throw new ArgumentNullException("editControl");

            SetIntegerFormat(editControl, minValue, maxValue, minValue);
        }

        /// <summary>
        /// Set SpinEdit integer format.
        /// </summary>
        /// <param name="editControl">SpinEdit Control</param>
        /// <param name="minValue">Min Value</param>
        /// <param name="maxValue">Max Value</param>
        public static void SetIntegerFormat(this SpinEdit editControl, int minValue, int maxValue, int defaultValue) {
            if (editControl == null)
                throw new ArgumentNullException("editControl");

            editControl.Properties.IsFloatValue = false;
            editControl.Properties.Mask.EditMask = "N0";
            editControl.Properties.DisplayFormat.FormatType = FormatType.Numeric;
            editControl.Properties.DisplayFormat.FormatString = "N0";
            editControl.Properties.EditFormat.FormatType = FormatType.Numeric;
            editControl.Properties.EditFormat.FormatString = "N0";
            editControl.Properties.MinValue = minValue;
            editControl.Properties.MaxValue = maxValue;
            editControl.Value = defaultValue;
        }


 LotQtySpinEdit.SetIntegerFormat(1, 999999, 1);

阅读更多
版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/albert528108/article/details/52350368
个人分类: ASP.NET Function
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页

不良信息举报

Eidt Value setting

最多只允许输入30个字

加入CSDN,享受更精准的内容推荐,与500万程序员共同成长!
关闭
关闭