Databinding Failure Part II

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?
 
G

Guest

On the form with the single record, calling endcurrentedit on the
bindingcontext object for each datatable in the dataset worked.

On the form with the multiple records this did not work. HasChanges is
always false; yet GetChanges works.

wr
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top