Skip to content

How to bind bindingnavigator with datagridview

Elvia Gonzalez

Asked May 10, 2006, 8:01 AM EDT1 answer
Share
LinkedInX

Hi everybody,

I'm trying to make the bindingnavigator work but I could not find documentation or examples. I want to bind the bindingnavigator to the rows of my datagridview. If this might not be possible via databinding an example of another way would be more than welcome.

Loads of thanks for your assistance,

 

Elvia

1 Answer

Know the answer? Post it. Somebody with the same question will find it here.

  • +1

    I needed to create a BindingSource object to bind it to the bingdingNavigator and the dataGridView.

    DataTable dt = new DataTable();
    dt.Load(GetReader());

    BindingSource bindingSource = new BindingSource();
    bindingSource.DataSource = dt;
    testcaseBindingNavigator.BindingSource = bindingSource;
    dataGridView.DataSource = bindingSource;

    Elvia

    +1