• 00
  • :
  • 00
  • :
  • 00

Dev

 

调用DoValidate()始终返回true

解决方案

txtCarNo.IsModified = true;
result = result & txtCarNo.DoValidate();

 

 

LayoutControl设置LayoutControlItem的MaxSize和MinSize。

 

对于设置的最大Size和最小Size,可以设置simplebutton的AutoWidthInLayoutControl属性为true,并设置 当前simplebutton的layoutitem的 SizeConstraintsType属性为SupportHorzAlignment,即可使最大Size和最小Size起作用!

GridView验证行并取消不通过时弹窗  去掉验证行失败时弹出的确认框

        void gv_CardTime_ValidateRow(object sender, DevExpress.XtraGrid.Views.Base.ValidateRowEventArgs e)
        {
            bool V = true;
            if (String.IsNullOrEmpty(gv_CardTime.GetFocusedRowCellDisplayText("CardTime")))
            {
                gv_CardTime.SetColumnError(gridColumn1, "时间不能为空!");
                //e.ErrorText = "时间不能为空!";
                V = false;
            }
            e.Valid = V;

        }



        void gv_CardTime_InvalidRowException(object sender, DevExpress.XtraGrid.Views.Base.InvalidRowExceptionEventArgs e)
        {
            //去掉验证行失败时弹出的确认框
            e.ExceptionMode = DevExpress.XtraEditors.Controls.ExceptionMode.NoAction;
        }
posted @ 2015-03-03 10:33  Garson_Zhang  阅读(429)  评论(0编辑  收藏  举报