DataGrid and autoincrement

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a datagrid that looks at a dataset that I manually fill from a remote
database.
My first column is auto incremented. When I populate the dataset from the
remote database the datagrid shows everything that I want it to. The problem
is that when I clear the datatable(datatable1.clear) and repopulate the
database the autoincrement column starts at the last number that was in the
datagrid before I cleared it.
Any suggestions.

Thanks,
DCSTech
 
The DataColumn has a Autoincrement property as well as a .AutoIncrementSeed
property htat you can specify - set it to 0 before refilling it and it'll
start over at 0
 
Back
Top