How to identify which option (Add new, Delete and etc) was chosen in a BindingNavigator
and which method to use to capture the click.
How to identify which option (Add new, Delete and etc) was chosen in a BindingNavigator
and which method to use to capture the click.
I do not know if I understood the question very well ... but if you're using Visual Studio, just double click on the desired BindingNavigator
button it will create and automatically associate a method with the button event .
For example, you can double-click the AddNewItem button, which will create the bindingNavigatorAddNewItem_Click
method that will be associated with the Click
event.
Event method generated for the click of the AddNewItem
button:
private void bindingNavigatorAddNewItem_Click(object sender, EventArgs e)
{
}
To associate to the event click of the button DeleteItem
the procedure is analogous.
The BindingNavigator
component has multiple items, these items have individual properties and events, for example, if you click the item that has a +
and it is in the Properties palette, you will see the properties, and events available, just like you do with a Button
normal.