title: C# sync'ing bindingsource and underlying datasource
body: <p>Currently having issues with referencing row data in a databound datatable.
  The binding is configured as follows:
  DataGridView => BindingSource => DataTable</p>
  
  <p>The datagridview allows multiple row selection and sorting.</p>
  
  <p>I have a button which initiates some methods based on the selected datagridview rows:</p>
  
  <pre><code>ItemsBindingSource.DataSource = dataSets.Tables["ItemList"];
  
  foreach(DataGridViewRow SelectedItem in datagridview1.SelectedRows)
  {
       string SelectedItemName = SelectedItem.Cells[1].Value.ToString();
       int rowPosition = ItemsBindingSource.Find("Name",SelectedItemName);
       RunSomeMethod(dataSets.Tables["ItemList"].Rows[RowPosition]);
  }
  
  void RunSomeMethod(DataRow row)
  {
      // run some code and modify the values of particular cells within the 
      // row and save the changes
  }
  </code></pre>
  
  <p>My issue is that when I sort the Datagridview, the rowPosition for the selected item no longer matches the row position of the BindingSource's underlying datasource. I need some advice on getting the bindingsource and it's underlying datasource to sync, or perhaps a better way of accomplishing this task altogether. Appreciate any advice.</p>
  
  <p>*EDIT</p>
  
  <p>I have realised I can reference the row based on Primary Key value, example:</p>
  
  <pre><code>foreach(DataGridViewRow selectedItem in datagridview1.SelectedRows)
  {
  int selectedItemPrimaryKey = selectedItem.Cells[0].value;
  RunSomeMethod(dataSets.Tables["ItemList"].Rows.Find(selectedItemPrimaryKey));
  }
  </code></pre>
  
  <p>Not as pretty as I had hoped, but seems to be doing the job. Still open to other suggestions. I am quite new to databinding.</p>