Bug Report Q472176
Visible to All Users

UI.Web - Callback is not triggered when immediately saving in inline edit mode (input focus kept before saving)

created 12 years ago

Hello XAF Team,
In Web UI, I found a bug in 'inline edit' mode of list views:
- When a property editor is changed (decorated with ImmediatePostData attribute), if the input focus is moved out of this property editor, then callback will be triggered, and saving the record will work smoothly. <== OK
- When a property editor is changed (decorated with ImmediatePostData attribute), immediately click 'Update' inline action to save the record directly. Now, the callback was not triggered, as if it does not exist. <== Bug

Note: In Win UI, the same scenario works without any issue.
To learn how to re-produce the above bug, please see the attached VS2010 + v12.2.6 solution, as well as the .mp4 screen video (VS solution and .mp4 are exactly the same as Q472173, but this is a different bug than that).
UPDATE: 'Log' column is used for demo purpose. In real business scenarios, 'Log' column may stand for 'Unit of Measure', 'Discount Amount', 'Currency Rate', etc. End users need to change the default value (calculated by ImmediatePostData).
UPDATE 2: If I decorate 'Log' column as AllowEdit = false (according to your recommendation), then two new bugs appear:
-- 1) When a new row is inserted (inline mode), the 'Log' column (AllowEdit = false) is displayed as editable (but you cannot input any value in it). ***Until a first callback is triggered, it remains 'editable' (because there is not any 'grey' text), not 'read only'***;
-- 2) When a new row is inserted (inline mode), try click 'Up' or 'Down' spin button of 'Integer Property' column, and then click checkbox of 'Boolean Property' column or select a date in 'DateTime Property' column, you'll find that only 'Interger Property' column can trigger further callbacks. Only the first column which triggers callback (to update the read only 'Log' column) can trigger additional callbacks, before you save the new row. This bug does not occur when editing a saved row.
In short (April 9, 2013): After inserting a new row, if a callback is triggered after changing a column, then other columns may be unable to trigger callbacks any more.
Regards,
James

Answers approved by DevExpress Support

created 12 years ago (modified 12 years ago)

We have fixed the issue described in this ticket and will include the fix in our next maintenance update. To apply this solution before the official update, request a hotfix by clicking the corresponding link for product versions you require.

Note: Hotfixes may be unavailable for beta versions and updates that are about to be released.

    created 12 years ago (modified 12 years ago)

    Hi James,
    Thank you for contacting us.
    In this particular scenario the value of the Log property is overridden by the value that was received from the client side. To avoid this I can only suggest you make this property read-only using the [DevExpress.ExpressApp.Model.ModelDefault("AllowEdit", "False")] attribute for example. Making this property read-only will prevent raising of the ValueChanged event of the corresponding editor and writing the editor's value to the objects property. Let me know if I can assist you further.
    UPDATE
    We do not recommend using the editable property whose value is also calculated or dependent.
    If you need this property to be editable, I can only suggest that you introduce a new additional editable property in your object (for example, ManualCurrencyRate) and make your original property (Log or Currency) read-only. This read-only property should return a calculated value if the newly added property value is not set, or its value in the other case. For more details, please refer to the Can't change parent object's property value when property allows edit ticket.

      Show previous comments (16)
      Dennis Garavsky (DevExpress) 12 years ago

        There are no problems with this mode we are aware of. Let us know if you experience any difficulties with this.

          Thanks Dennis for your clarification! I've tried OidInitializationMode.AfterConstruction mode but it didn't help this issue (Q472176) or another issue (Q472180):
          - Scenario 1: After inserting a new row (the second, the third or the fourth, etc.), the same 'target' column in another previously-saved row is also affected by the callback triggered in the new row.
          - Scenario 2: After inserting a new row, if a callback is triggered after changing a column, then other columns may be unable to trigger callbacks any more.

          Dennis Garavsky (DevExpress) 12 years ago

            James, I did not say that this option will solve your problems. I just described how to enable it in XAF for you to test. You will be automatically informed about the proper solution via email once we have found it.

            Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

            Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.