110,571
社区成员
发帖
与我相关
我的任务
分享
FirstLevelGrid.Focus();
FirstLevelGrid.TopRowIndex = RowHandle;
FirstLevelGrid.FocusedRowHandle = RowHandle;
FirstLevelGrid.FocusedColumn = FirstLevelGrid.Columns["name"];
private void FirstLevelGrid_ValidateRow(object sender, DevExpress.XtraGrid.Views.Base.ValidateRowEventArgs e)
{
if (string.IsNullOrEmpty(Convert.ToString(GvCase.GetRowCellValue(e.RowHandle, "name"))))
{
e.Valid = false;
FirstLevelGrid.SetColumnError(GvCase.Columns["name"], "名称不得为空");
FirstLevelGrid.Focus();
FirstLevelGrid.FocusedRowHandle = e.RowHandle;
FirstLevelGrid.FocusedColumn = FirstLevelGrid.Columns["name"];
}
}
private void FirstLevelGrid_InvalidRowException(object sender, DevExpress.XtraGrid.Views.Base.InvalidRowExceptionEventArgs e)
{
e.ExceptionMode = DevExpress.XtraEditors.Controls.ExceptionMode.NoAction;
}