DataGridView Will only handle 3 data rows - 09-23-2008 , 04:28 PM
I've got a DataGridView on a winform, databound to a typed dataset. When I
set the datasource of the grid, I can see the number of rows in the dataset
and the number of rows in the datasource and use the visualizer to verify
that both contain the same rows. If there are three or fewer rows in the
underlying table, the grid fills and behaves as expected, including
displaying the template row. If there are 4 or more rows in the table, the
grid throws errors on the datasource binding (it balks at rowindex 3) and
then displays the grid with the first two rows of data but no add row and
none of the rest of the rows in the table. The behavior is the same whether
you try to attach to a table that has more than 3 rows or whether you add
rows to an empty table. Once you get past 3, something weird happens.
I've been struggling with this for two days, and it's making me crazy!
|Thread Tools||Search this Thread|