Windows form c# identify which Bindingnavigator button was clicked

Asked

Viewed 406 times

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.

2 answers

3


I don’t know if I understand the question very well... but if you are using Visual Studio, just double click on the desired button of BindingNavigator that it will create and associate a method to the button event automatically.

For example: you can double-click on the Addnewitem button, which will be created the method bindingNavigatorAddNewItem_Click that will be associated with the event Click of the same.

inserir a descrição da imagem aqui

Event generated method for button click AddNewItem:

private void bindingNavigatorAddNewItem_Click(object sender, EventArgs e)
{

}

To associate to the event click button DeleteItem the procedure is analogous.

  • Thank you! That’s what I needed.

1

The component BindingNavigator has several items, these items have individual properties and events, for example if you click on the item that has a + and is on the palette Properties, you will see the properties and events available, just as you do in a Button normal.

  • Thank you for supplementing the reply.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.