GridControl 校验输入单元格格式 z

// 对应的校验行事件,ValidateRow

private void gv_FeeItem_ValidateRow(object sender, DevExpress.XtraGrid.Views.Base.ValidateRowEventArgs e)
        {
            object name = this.gv_FeeItem.GetFocusedRowCellValue(gc_SubjectName);
            if (name is DBNull)
            {
                e.ErrorText = "提示错误信息";
                this.gv_FeeItem.SetColumnError(gc_SubjectName, e.ErrorText, ErrorType.Critical);
                e.Valid = false;
                return;
            }
}

 

posted on 2015-03-03 16:22  武胜-阿伟  阅读(1072)  评论(0编辑  收藏  举报