1

I am trying a project Database Connection from Guru99 tutorial for C#. I have to put a BindingNavigator in Windows Forms App but I don't have that in my ToolBox.

1 Answers1

4

I can't speak for Visual Studio 2022 but Visual Studio 2019 does not have a BindingSource available in the toolbox for one reason or another so with that see if the following provides a BindingNavigator in your toolbox.

If this is the case, try adding the following class to your project.

public class CoreBindingNavigator : BindingNavigator
{
    public CoreBindingNavigator()
    {
        AddStandardItems();
    }
}

Build the project and you should see the CoreBindingNavigator in your toolbox.

Karen Payne
  • 4,341
  • 2
  • 14
  • 31
  • 1
    This worked for me. It had to be in the same project as the form I was designing, though. It didn't work when I added it to my 'Common' project. Thanks! – d ei Oct 22 '22 at 00:46
  • 1
    I never tried the component in a class project and used it in a forms project but just did and zero issues. – Karen Payne Oct 22 '22 at 02:17
  • Wherever you put this, it seems to work and thank you for the answer. If just exposing the old class to .Net Core like this works, then I don't understand why it is not included in Core out of the box. I wonder if we will run into any issues... – djv Jan 20 '23 at 19:52