private void unconfirmedMenuClicked_ItemClicked(object sender, ToolStripItemClickedEventArgs e) { DataRow dataRow = gridUnconfirmedView.GetFocusedDataRow(); if (dataRow != null) { if (e.ClickedItem.Text == "Delete") { if (DialogResult.Yes == XtraMessageBox.Show("Are you sure you would like to delete this?", "Confirmation", MessageBoxButtons.YesNo, MessageBoxIcon.Question)) { DeleteIssueDoc(Convert.ToInt32(dataRow["ID"])); // Refresh it gridViewReferences_FocusedRowChanged(null, null); //XtraMessageBox.Show("Issue has been deleted"); } } else if (e.ClickedItem.Text == "Confirm") { IssueDoc doc = new IssueDoc(); doc.LoadByPrimaryKey(Convert.ToInt32(dataRow["ID"])); // do some validations if (doc.IsColumnNull("STVID")) { doc.STVID = _stvLogIdChosen.Value; doc.Save(); } // refresh XtraMessageBox.Show("You have confirmed the STV", "Confirmation", MessageBoxButtons.OK, MessageBoxIcon.Information); gridViewReferences_FocusedRowChanged(null, null); } } }