private void gridView1_RowUpdated(object sender, DevExpress.XtraGrid.Views.Base.RowObjectEventArgs e) { try { var dc = new ClassSRMDataContext(Config.connection); int id = (int)gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "Id"); int idStu = (int)gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "StudentId"); int score = (int)gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "Score"); var date = gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "Date").ToString(); var book = gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "Book").ToString(); var desc = gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "Descr").ToString(); dc.UpdateEvaBook(id, idStu, score, book, date, desc); tblEvaPointBindingSource.EndEdit(); dc = new ClassSRMDataContext(Config.connection); XtraMessageBox.Show("امتیاز موردنظر با موفقیت ویرایش شد", "توجه", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception) { } }