private void AddAccessLevelToGrid() { UserGrid.Rows[SelectedRow].Cells[UsersCols.AccessLevel].Selected = true; UserGrid.BeginEdit(false); UserGrid.Rows[SelectedRow].Cells[UsersCols.AccessLevel].Value = CalcAccessLevel(); UserGrid.EndEdit(); }
private void cmdUpdate_Click(object sender, EventArgs e) { try { var blah = OtherFunctions.Message("Are you sure? Committed changes cannot be undone.", MessageBoxButtons.YesNo, MessageBoxIcon.Question, "Commit Changes", this); if (blah == DialogResult.Yes) { UserGrid.EndEdit(); AddGuids(); DBFactory.GetDatabase().UpdateTable(Queries.SelectUsersTable, (DataTable)UserGrid.DataSource); ListUsers(); SecurityTools.PopulateUserAccess(); } else { } } catch (Exception ex) { ErrorHandling.ErrHandle(ex, System.Reflection.MethodBase.GetCurrentMethod()); } }