title: VB.net 2010 - IndexOutOfRange from datagridview when refreshing dataset
body: <p>I have a datagridview on a form that is bound to a table in a dataset from another class.</p>
  
  <p>I use a data adapter to .Fill a table in that dataset and the grid displays the data fine.</p>
  
  <p>Works fine.</p>
  
  <p>On my form I have a textbox the user can type in that will will pass a parameter to the storedprocedure used to fill this table.   So on startup the textbox will have "%" in it.  and then the user can type in "F%" and get everything that starts with an "F"</p>
  
  <p>So when that textbox changes I launch an async refresh (.BeginInvoke) to do my refresh.  The table gets populated with the reduced number of records (I check ds.table(0).rows.count and it is correct)   </p>
  
  <p>But the datagridview then starts throwing datagridview.dataerror events.  "System.IndexOutofRangeException : Index # does not have a value"</p>
  
  <p>It looks like the dataset is getting filled correctly and not having any issues, but the datagrid is not liking this update.  The index out of range error is so common that I'm not finding what I need through searches.  </p>
  
  <p>Thanks in advance!  :)  </p>