I have a DataGridView which I am binding like so:
companies = new BindingList<Company>(PersistenceManager.Instance.RetrieveAll<Company>(SessionAction.BeginAndEnd));
bindingSource.DataSource = companies;
potentialInvestorDataGridView.DataBindings.Add("DataSource", bindingSource, "PotentialInvestors");
The problem is when I add to the PotentialInvestors list
Company company = bindingSource.Current as Company;
company.PotentialInvestors.Add ( new Investor ( ) );
The datagrid does not get updated with a new row. I have tried to calling
bindingSource.ResetCurrentItem();
potentialInvestorDataGridView.EndEdit();
potentialInvestorDataGridView.Refresh();
But nothing seems to update the data grid. (If I close the dialog and reopen it the items are now displayed).
What do I need to do to have this updated properly?