private void ViewCourse_CellValueChanged(object sender, DevExpress.XtraGrid.Views.Base.CellValueChangedEventArgs e) { if (!e.Column.FieldName.ToString().Equals("IsEdited")) { if (ViewCourse.GetRowCellValue(e.RowHandle, "CourseID").ToString().Equals("")) { ViewCourse.SetRowCellValue(e.RowHandle, "IsEdited", "2"); } else { ViewCourse.SetRowCellValue(e.RowHandle, "IsEdited", "1"); } } }