OK, well the option may be greyed out because:
It is not available, or
It always happens and you cannot turn it off
I'd have expected unticked-greyed in the former and ticked-greyed in the latter. However, we can answer this question more directly:
Put a breakpoint on the line BEFORE you call Update. Look at the row values using the dataset visualizer (highlight datatable variable, point to it, click magnifying glass in the tooltip). You see your normal autonumber from the DATASET, right?
Now step over the Update (point of note: youre Update() the ORIGINAL datatable, NOT the copy that GetChanges gives you, right? Do not use GetChanges()!)
Now look at the datatable visualizer again. Crucial question: Did the value change (to the autonumber from the DB) or not?
If your DB is blank or empty then PLEASE DONT START your dataset autonumber from the SAME seed as the DB! (For the reason that if the DS calc an ID of 1, and then the DB also calcs 1, it wont look like it changed. Use a seed of -1 and a step of -1 in the dataset if needs be)
|