DataGridView and BindingSource Exception

Jun 26, 2007 at 5:37 PM
Hi Raf,
I'm trying the collection but a I have a problem.
In my code I have one DataGridView related to a BindingSource.
On Form Load when I fill my RafCollection and I set the DataSource of the BindingSource I receive the following error: ArgumentOutfRangeException "Argomento specificato non compreso nell'intervallo. Nome parametro: rowIndex".
The error is not fired if I bind the data to a combobox. The exception is fired inside the OnListChanged method.


Thanks
Andrea
Coordinator
Jul 2, 2007 at 4:29 PM
Could you please tray modifying the EndNew method?
private void EndNew(int itemIndex) // ICancelAddNew
{
if(itemIndex < 0)
return;
....
}
For some reason the gridview calls endnew with a negative index value.

Please, let me know the result.... thanks.
Jul 9, 2007 at 2:35 PM
I modified the EndNew method and now the error is not fired.
Coordinator
Jul 9, 2007 at 9:40 PM
Great :)