Windows form c # identify which button of the BindingNavigator was clicked

1

How to identify which option (Add new, Delete and etc) was chosen in a BindingNavigator and which method to use to capture the click.

    
asked by anonymous 16.12.2014 / 01:26

2 answers

3

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.

    
16.12.2014 / 01:39
1

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.

    
16.12.2014 / 01:38