I have a winForm with a dataGridView containging members of a team. These members each have an assigned role and other properties that are listed in a column in the grid but for the purpose of what I want to achieve they are irrelevant. I've also added a bindingNavigator with add, edit and delete buttons.
What I would like to implement is that the edit/delete button should be disabled when I select a row containing a team member in a certain role (Key Account Manager and some others) and be enabled when the selected member has no such role.
So, how can I set this up? Is there an event for the current selected row or selecting a new row I can add my code to?
I'm thinking something along he lines of this pseudocode:
if (SelectedRow.DataboundObject.Role == "KEY_ACCOUNT_MANAGER")
{
bindingNavigatorChangeItem.Enabled() = false;
bindingNavigatordeleteItem.Enabled() = false;
}