Question : DGV Error - System.IndexOutOfRangeException: Index 0 does not have a value.

On Form1_Load, the TableAdapter.Fill fills the DVG on the form without problem.

After my code inserts data into a table, the DGV on the form is updated by TableAdapter.Fill which works showing the new data in the DGV. I then receive a "DataGridView Default Error Dialog" with the message:

System.IndexOutOfRangeException: Index 0 does not have a value.
 at System.Windows.Forms.CurrencyManager.get_Item(Int32 index)
 at
System.Windows.Forms.DataGridView.DataGridViewDataConnection.GetError(Int32 rowIndex)

Why am I getting this error?

Answer : DGV Error - System.IndexOutOfRangeException: Index 0 does not have a value.

Nice. So it is working now?
If the disposed event didn't work I was going to ask you to post your entire code because I was looking into using Begininvoke vs. Invoke. Invoke doesn't appear to release the thread. And I was thinking of trying doevents although not for the same reasons that the website cites. I was trying not to have to do a total re-write of your code so it would be quicker.......    :)    in retrospect...            : \
Very nice and easy to follow site. Thanks for sharing.
Random Solutions  
 
programming4us programming4us