Example:
Suppose we have a Customer DataEntryForm with bound Customer entry controls.
On that DataEntryForm we have a DataGridView for Orders.
We also have an Order DataEntryForm with bound Order entry controls.
From within the Orders DataGridView the end-user can add/change a row and the Order DataEntryForm will be shown.
For the Customer IsUpdatedByParent should be false, because it has no parent on which it depends.
For the Order IsUpdatedByParent can either be true/false. It can be set, because it is dependent on a Customer.
When setting IsUpdatedByParent to true for Order update (add/change/remove) actions:
- it means that all data (Customer and Order) is persisted when an end-user presses the OK button on the parent (in this case the Customer DataEntryForm).
- when you want the end-user to be able to add a new Customer and within that add a new Order IsUpdatedByParent should be true. Because the new Order can only be persisted to the database when there is already a Customer present.
When setting IsUpdatedByParent to false for Order update (add/change/remove) actions:
- it means that the Order data is persisted immediately when an end-users presses the OK button on the Order DataEntryForm.
- when the end-user wants to add a new Order a Customer must already be present. For a new Customer with a new Order the end-user has to add the new Customer, press OK, press the Change button and go to the Order DataGridView to add a new order.
Normally in the example above setting IsUpdatedByParent to true is the most convenient one.
In the real world end-users love this behavior for adding new records.
However pressing OK might be confusing to the user in case of Change actions.
Let's use the example above to explain this:
When an end-user goes into change mode for a Customer and adds/changes/removes an Order record they assume that OK immediately means that this action is saved (persisted into the database at once). At the parent level (the Customer DataEntryForm) they press Cancel intuitively because they haven't changed anything at the Customer level.
In case IsUpdatedByParent is true this means that they lose the Order data actions they just did. So we had to tell end-users explicitly that OK at the parent level was necessary too.
At the moment we are trying to solve this and are testing a new possible solution. For an intuitive solution for the end-user the ideal situation seems to be:
- a setting of IsUpdatedByParent to true when the UpdateMode of the parent DataEntryForm is Add/Copy
- a setting of IsUpdatedByParent to false when the UpdateMode of the parent DataEntryForm is Change
This means the data is persisted to the database at different times. Thinking about this it might be even more confusing, but intuitively most end-users seem to expect this kind of behavior. When useful this 'auto change IsUpdatedByParent' feature will be present in the next RADvolution version.
Demo
To see the current IsUpdatedByParent feature in action you can take a look at demo 4 (Customer Journal, a 1 to many demo) of the Database Edition demos at http://www.developguidance.com/RADvolution_demos.htm
0 comments:
Post a Comment