G
Guest
I created a form that displays one record depending on the choice made via a
combo box. In otherwords muliple records are Not filled into the form's
dataset, only one. Hence there is no navigation.
When I change a field on the form and press update, that routine first
checks to see if the dataset has changes via the HasChanges property. This
is always false, hence the update is not happening.
I went back to check this behaviour on another working form where I have
multiple records and record navigation (via bindingcontext().position). If I
make a change on the record and do nothing else but check the value of
HasChanges, HasChanges is false. If navigate to the next record and check
HasChanges, HasChanges is true.
Thus, if a user makes a change on the first record and closes the form (via
control on upper right corner of form), HasChanges tests false and the form
closes without saving the change.
However, making a change on the first record and pressing the Update button
works because it executes GetChanges on the main dataset and creates a delta
dataset, and checks for the fact the delta datase is not nothing.
What is going on here?
combo box. In otherwords muliple records are Not filled into the form's
dataset, only one. Hence there is no navigation.
When I change a field on the form and press update, that routine first
checks to see if the dataset has changes via the HasChanges property. This
is always false, hence the update is not happening.
I went back to check this behaviour on another working form where I have
multiple records and record navigation (via bindingcontext().position). If I
make a change on the record and do nothing else but check the value of
HasChanges, HasChanges is false. If navigate to the next record and check
HasChanges, HasChanges is true.
Thus, if a user makes a change on the first record and closes the form (via
control on upper right corner of form), HasChanges tests false and the form
closes without saving the change.
However, making a change on the first record and pressing the Update button
works because it executes GetChanges on the main dataset and creates a delta
dataset, and checks for the fact the delta datase is not nothing.
What is going on here?