question

Bek-8036 avatar image
0 Votes"
Bek-8036 asked Bek-8036 commented

Binding Navigator

Hi Guys,
Hope you are all fine.
I am not a guru in Visual Studio and I need your help.
In fact I designed a form on which I have a binding navigator class. I would like to replace the built-in method codes behind the buttons (e.g. the add new item button method) with my custom code. How can achieve that?
Thanks for any advice you have for me.
Bek

windows-10-generalvs-general
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi Bek,
Based on your description, you issue is more related with Visual Studio which our forum doesn't focus on, so I add VS related tag for your post to get support from corresponding engineers, thank you for understanding

0 Votes 0 ·

Could you please tell us what is your project, Winforum or wpf?
If it is convenient, please share your code with us to confirm which team can help you.

0 Votes 0 ·

1 Answer

karenpayneoregon avatar image
0 Votes"
karenpayneoregon answered Bek-8036 commented

It's easy, select the BindingNavigator on the form followed by selecting the Property Window.

Now to change for example the Add button, select AddNewItem, change the value to None. Now double click on the Add button in the BindingNavigator and add code which will now execute rather than the default behavior. This also means there is no default behavior so you need to write code if that is needed.

Also you can see in one of my code sample I've done this.

104003-figure1.png



figure1.png (27.6 KiB)
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thank you very much for your help. It solve my problem in some way.

0 Votes 0 ·