When cloning a DataTable, it appears that seed counts are also copied to the new table e.g. dtbSource has 50 rows, clone dtbSource to dtbClone and then add the first new row to dtbClone ... this new row will have an "ID" of 51 rather than 1. Setting AutoIncrementSeed on dtbClone has no effect whatsoever. In actual fact I have tried multiple variations of AutoIncrementSeed and AutoIncrementStep including:
Expand|Select|Wrap|Line Numbers
- dtbClone.Columns("ID").AutoIncrementStep = -1
- dtbClone.Columns("ID").AutoIncrementSeed = -1
- dtbClone.Columns("ID").AutoIncrementStep = 1
- dtbClone.Columns("ID").AutoIncrementSeed = 1
Thanks in advance for any insight,
Rod.