title: Refresh BindingSource correctly
body: <p>I have a master-detail grid view on windows forms. I a very simple Repository (repo in code) that queries the database to get back DataTables.</p>
  
  <p>At first I load the Data and define a relation like u see in the LoadData() method. Next, After I edit my Master table I want to refresh the view datasource. That's the unimplemented RefreshData(); method. If I'm refreshing after Edit I need the bindingsource not to lose the "current" row.</p>
  
  <p>Here is the code: </p>
  
  <pre><code>    public void LoadData() 
      {
          //define the Bindingsource and 2 Datatables.
  
          binder = new BindingSource();
          tbTaxPayers = repo.GetTaxPayersDataTable(-1);
          tbLinkedOrganizations = repo.GetTaxPayersLinkedOrganizations();
  
          //create a dataset to define the relation so that the view can pick it up
          ds = new DataSet();
          ds.Tables.Add(tbTaxPayers);
          ds.Tables.Add(tbLinkedOrganizations);
          ds.Relations.Add("LinkedOrganizations", tbTaxPayers.Columns["CLI_ID"], tbLinkedOrganizations.Columns["LCC_CLI_ID_PARENT"]);
  
          //set datasource to the main table.
          binder.DataSource = tbTaxPayers;
          view.LoadData(binder);
      }
  
  
      public void RefreshData()
      {
         // how to refresh without overhead ? and without losing focus if I just edit ?
      }
  </code></pre>
  
  <p>EDIT:</p>
  
  <p>By doing the next code it works but I have to create a new DataSet with every refresh. And it smells to me cause it almost a duplicate of my LoadData() method.</p>
  
  <pre><code>public void RefreshData()
      {
          tbTaxPayers = repo.GetTaxPayersDataTable(-1);
          tbLinkedOrganizations = repo.GetTaxPayersLinkedOrganizations();
          ds = new DataSet();
          ds.Tables.Add(tbTaxPayers);
          ds.Tables.Add(tbLinkedOrganizations);
          ds.Relations.Add("LinkedOrganizations", tbTaxPayers.Columns["CLI_ID"], tbLinkedOrganizations.Columns["LCC_CLI_ID_PARENT"]);
          binder.DataSource = tbTaxPayers;
      }
  </code></pre>