Bug Report Q429469
Visible to All Users

UI.Web - BooleanPropertyEditor is not updated in the nested ListView after the associated record is changed in a popup window

created 13 years ago

I have a
one screen Named Domain Object1 having one-many(aggregated) association
with Domain Object2(See Image1).
Problem is
that when I edit this child grid and update record of check box(for example:
checked check box which is displaying.)(see image 2) and then even after
clicking on main saved it is not displaying updated record.
Still it is
display previous entry I.e. (Image 1). It will show updated record once I save
and close and then reopened that record in edit mode. (same problem exist
in Security Role while changing permission.)

Please refer to attached project for reference.

Show previous comments (2)
DevExpress Support Team 12 years ago

    We are working on this problem, and you will be automatically notified when we find a solution.

      I have same problem.
      Is there any workaround for this problem?

      DevExpress Support Team 12 years ago

        Hi Alexey,
        We are still working on this problem. We appreciate your patience while we are working to find a solution as there is no way to work around this problem.

        Answers approved by DevExpress Support

        created 12 years ago (modified 12 years ago)

        Hi guys,
        We have researched the problem and concluded that it is required to introduce a lot of changes to fix it. We will see how to improve this situation. During our research we have also found that this behavior can be reproduced if you show collection properties in Edit mode only. In the meantime, I suggest you disable the showing of the collection properties in Edit mode by removing the following line from your application:

        Code
        ((ShowViewStrategy)base.ShowViewStrategy).CollectionsEditMode = DevExpress.ExpressApp.Editors.ViewEditMode.Edit;

        Alternatively, use the workaround from the Checkboxes are not refreshed in ASP.NET ticket.

          Show previous comments (1)
          DevExpress Support Team 12 years ago

            Hi Nikesh,
            Thank you for the update.
            I see your point of view and agree with you that this behavior can be improved, but currently this improvement will require making a lot of changes in our framework. If showing collections in view mode does not meet your requirements, check if Alexey's solution can address your needs. I am afraid that currently we do not have anything else to offer you. We will see how we can improve this behavior in the future.

              I have currently set CaptionsForBoolValuesAttribute to true… i.e. changed to drop-down but I and my users prefer check box. Please try to resolve the bug as soon as possible. Thanks.

              DevExpress Support Team 12 years ago

                As it was already mentioned earlier, we will see how we can improve this behavior, but I cannot promise any time frame.

                Other Answers

                created 12 years ago (modified 12 years ago)

                For my personal needs I replace default property editor for bool.
                My editor show label in view mode and problem doesn’t appear.

                C#
                [PropertyEditor(typeof(bool), true)] public class CustomBoolEditor : ASPxPropertyEditor { private ASPxCheckBox checkBoxForEdit; private ASPxLabel checkBoxForView; public CustomBoolEditor(Type objectType, IModelMemberViewItem info) : base(objectType, info) { } protected override WebControl CreateEditModeControlCore() { checkBoxForEdit = RenderHelper.CreateASPxCheckBox(); checkBoxForEdit.ValueChanged += ExtendedEditValueChangedHandler; return checkBoxForEdit; } protected override WebControl CreateViewModeControlCore() { checkBoxForView = RenderHelper.CreateASPxLabel(); return checkBoxForView; } protected override void ReadValueCore() { if (ViewEditMode == ViewEditMode.View) { checkBoxForView.Text = true.Equals(PropertyValue) ? "yes" : ""; } else { base.ReadValueCore(); } } public override void BreakLinksToControl(bool unwireEventsOnly) { if (checkBoxForEdit != null) { checkBoxForEdit.ValueChanged -= ExtendedEditValueChangedHandler; } base.BreakLinksToControl(unwireEventsOnly); } }
                  Comments (2)
                  DevExpress Support Team 12 years ago

                    I am glad to hear that you have accomplished your task.
                    PS. In your scenario, you can use the CaptionsForBoolValuesAttribute attribute instead of creating your own property editor.

                    Anatol (DevExpress) 12 years ago

                      Here is another workaround: Checkboxes are not refreshed in ASP.NET.

                      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.