G
Guest
I am my wit's end with trying to use a datagrid to update a dataset. I can
get it to work for one row, but not muliple rows. I know what you're going
to say. Use endcurrentedit. I tried that but still does not work. All I
want to do is put up a datagrid bound to a dataset. After the user modifies
rows, he hits a button to update the original database. When I do this and
debug the datarowstate, not all rows show modified. Here is the code.
To load the grid:
dstable2.Clear()
dstable2 = TableDB.ListTable2 ' this is a class that gets data and fills
the dataset.
Tablegrid.SetDataBinding(dstable2, "Table2")
When the user presses the SAVE button:
BindingContext(dstable2.Tables(0)).EndCurrentEdit()
After this, if I loop through each row and check it's datarowstate, only
some rows show as modified, usually only the ones where I moved the cursor to
the next row.
The last row modified never shows as modified.
What's wrong?
get it to work for one row, but not muliple rows. I know what you're going
to say. Use endcurrentedit. I tried that but still does not work. All I
want to do is put up a datagrid bound to a dataset. After the user modifies
rows, he hits a button to update the original database. When I do this and
debug the datarowstate, not all rows show modified. Here is the code.
To load the grid:
dstable2.Clear()
dstable2 = TableDB.ListTable2 ' this is a class that gets data and fills
the dataset.
Tablegrid.SetDataBinding(dstable2, "Table2")
When the user presses the SAVE button:
BindingContext(dstable2.Tables(0)).EndCurrentEdit()
After this, if I loop through each row and check it's datarowstate, only
some rows show as modified, usually only the ones where I moved the cursor to
the next row.
The last row modified never shows as modified.
What's wrong?