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; } }