private void gridInactiveEmployees_RowEnter(object sender, DataGridViewCellEventArgs e) { try { this.SelectedEmployeeID = (int)gridInactiveEmployees.Rows[e.RowIndex].Cells["ID"].Value; string strDescription = gridInactiveEmployees.Rows[e.RowIndex].Cells["Description"].Value.ToString().Replace("\n", " "); headerGroupMain.ValuesPrimary.Heading = strDescription.ToUpper(); this.SelectedEmployeeActive = false; this.SelectedEmployeeDeleted = ServiceEmployee.IsDeletedEmployee(this.SelectedEmployeeID); btnDeleteItem.Text = (this.SelectedEmployeeDeleted) ? "Undelete" : "Delete"; btnActivate.Text = (this.SelectedEmployeeActive) ? "Deactivate" : "Activate"; RefreshTabPage(); } catch (Exception ex) { string errMessage = ex.Message; if (ex.InnerException != null) { errMessage += string.Format("\n{0}", ex.InnerException.Message); } MessageBox.Show(errMessage, "pageEmployees::gridInactiveEmployees_RowEnter", MessageBoxButtons.OK, MessageBoxIcon.Error); } }