title: BindingSource event wont allow me to get index of current dgv row
body: <p>This code works anywhere else.. form load, button click, etc. But when I add it to my tripsBindingSource_PositionChanged it says object reference not set to an instance of an object when its getting the selected row index. I'm assuming there is no selected row yet but why would it work at form load than? It is making my app bomb at run time. What can I do to fix this? Thanks!</p>
  
  <pre><code>private void tripsBindingSource_PositionChanged(object sender, EventArgs e)
  { 
      //get selected row index
      int index = this.dgvTripGrid.CurrentRow.Index;
      //get pk of selected row using index
      string cellValue = dgvTripGrid["pkTrips", index].Value.ToString();
      //change pk string to int
      int pKey = Int32.Parse(cellValue);
      ...
  }
  </code></pre>