private void DGvTransView_CellValueChanged(object sender, DevExpress.XtraGrid.Views.Base.CellValueChangedEventArgs e) { if (DGvTransView.GetRowCellValue(DGvTransView.FocusedRowHandle, "NatureComplaint").ToString() != string.Empty) { System.Data.DataRow dr = DGvTransView.GetDataRow(DGvTransView.FocusedRowHandle); //("Total"); if (DGvTransView.GetFocusedRowCellValue("ComplaintId") == DBNull.Value) { if (CommFun.CheckData("Nature_Complaint", "NatureComplaint", DGvTransView.GetFocusedRowCellValue("NatureComplaint").ToString(), "Nature Of Complaint") == false) { dr["NatureComplaint"] = string.Empty; DGvTransView.NewItemRowText = string.Empty; DGvTransView.DeleteRow(DGvTransView.FocusedRowHandle); } } } }
private void DGvTransView_CellValueChanged(object sender, DevExpress.XtraGrid.Views.Base.CellValueChangedEventArgs e) { //if (DGvTransView.Columns[e.ColumnIndex].Name == "ReminderName") if (DGvTransView.FocusedColumn.FieldName == "ReminderName") { if (DGvTransView.GetFocusedRowCellValue("ReminderName").ToString() != null) { if (DGvTransView.GetFocusedRowCellValue("ReminderName").ToString() != string.Empty) { if (CommFun.CheckData("Reminder", "ReminderName", DGvTransView.GetFocusedRowCellValue("ReminderName").ToString(), "Reminder Name") == false) { //DGVTrans.Rows.Remove(DGVTrans.CurrentRow); DGvTransView.DeleteRow(DGvTransView.FocusedRowHandle); //DGVTrans.CurrentRow.Cells["LevelName"].Value = string.Empty; } } } } }