D
Dale
I'm got strange behaviour calling AcceptChanges when initialising my
DataSet.
Before calling the EndInit() method when initialising a DataSet
(auto-generated), I initialise 2 static tables within the DataSet
(table data doesn't change at runtime). The first table is loaded by a
table adapter which makes the DataSet indicate no changed rows.
However, loading the second table manually makes the DataSet indicate
changed rows; so I call AcceptChanges() which fixes the problem. After
that I setup event handlers for RowChanged and ColumnChanged, and then
call EndInit() for the DataSet.
Now the fun starts. I load the form, load the dataset with the data to
edit, set the BindingSource, which all controls on the form are bound
to, and start editing. The event handlers which were setup earlier
never get called with AcceptChanges(). If I remove the AcceptChanges()
line when initialising the database, the row and column change events
get fired off.
Can someone please explain what's going wrong?
Dale.
DataSet.
Before calling the EndInit() method when initialising a DataSet
(auto-generated), I initialise 2 static tables within the DataSet
(table data doesn't change at runtime). The first table is loaded by a
table adapter which makes the DataSet indicate no changed rows.
However, loading the second table manually makes the DataSet indicate
changed rows; so I call AcceptChanges() which fixes the problem. After
that I setup event handlers for RowChanged and ColumnChanged, and then
call EndInit() for the DataSet.
Now the fun starts. I load the form, load the dataset with the data to
edit, set the BindingSource, which all controls on the form are bound
to, and start editing. The event handlers which were setup earlier
never get called with AcceptChanges(). If I remove the AcceptChanges()
line when initialising the database, the row and column change events
get fired off.
Can someone please explain what's going wrong?
Dale.