Hello all,
I'm having a problem with DataGirdView.
I am using a BindingSource object to bind that DataTable object to the DataGridView and I get the following exception thrown on the line I set the DataGirdView.DataSource = BindingSource object:-
Index was out of range. Must be non-negative and less than the size of the collection.\r\nParameter name: index"} System.Exception {System.ArgumentOutOfRangeException}
Heres the code:-
source =
newBindingSource();source.DataSource = dset.Tables[0];
resultsGrid.DataSource = source;
I am at a loss as to why this is happening as the the DataSet contains 1 table and the Table contains 1 row.
After it throws the exception the app binds the table to DataGridView as expected
Does anyone know why this would be happening ??
Thanks,
Sean