Bug Report T257461
Visible to All Users

Web - DetailView CollectionsEditMode=Edit does not work as expected

created 10 years ago (modified 10 years ago)

In Application.CollectionsEditMode=Edit mode everything works as expected, for example after calling save&close on child object's detail view nothing is written on database until parent object's save action is called. that's perfect and what we need.

We decided to use Application.CollectionsEditMode=View mode for Collections in all detail views, except needed ones.

But when we switch to Application.CollectionsEditMode=View and set DetailView.CollectionsEditMode=Edit on required detail views, this does not work like Application.CollectionsEditMode=Edit.

Creating new child or editing child and then saving&closing child object saves the parent object also and returns to the parent's detailview.

Show previous comments (3)

    Hi Aleks,
    I have the same problem. Can you give me a prevision to solve this or any other alternative way?

    Dennis Garavsky (DevExpress) 10 years ago

      @Gilson: Thanks for your feedback. We have not yet found a good solution for this. We are researching possible options (they imply overriding the CanUseNestedObjectSpace and GetObjectSpaceToShowDetailViewFrom methods of the ShowViewStrategy and XafApplication classes) and will update this thread once we have any news.

        Hi,
        Application Level 'Edit' mode: child modifications are done in popup windows.
        Application Level 'View' mode, and specific detail views in 'Edit' mode: child modifications redirect to new page not popup.
        We expect the same behaviour when we set CollectionsEditMode to Edit in specific detailviews when it was in edit mode in application level.

        Answers approved by DevExpress Support

        created 10 years ago (modified 10 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.

          Show previous comments (7)
          AG AG
          Alex Gn (DevExpress) 9 years ago

            Hello Wieland,
            As a workaround, you can set the CollectionsEditMode property to the 'View' value for "Person_DetailView", or create a custom DevExpress.ExpressApp.Web.ShowViewStrategy descendant and override the ShowViewFromNestedView method as follows:

            C#
            protected override void ShowViewFromNestedView(ShowViewParameters parameters, ShowViewSource showViewSource) { ViewEditMode? collectionsEditMode = GetCollectionsEditMode(showViewSource.SourceFrame); if(GetCurrentWindow(showViewSource) is PopupWindow || (collectionsEditMode == ViewEditMode.Edit)) { ShowDialog(parameters, showViewSource); } else { Application.MainWindow.SetView(parameters.CreatedView, showViewSource.SourceFrame); } }

            See also:How to create a custom ShowViewStrategy.
            Let me know if you need any further assistance.

              Hello, everybody.

              Has the original problem actually been fixed? We notice that our web frontend version 17.2.8 still behaves as described by Destek Patent.

              Anatol (DevExpress) 5 years ago

                Hello Wieland,

                I've created a separate ticket on your behalf (T817282: The parent object is saved when CollectionsEditMode is set to Edit for a single DetailView). It has been placed in our processing queue and will be answered shortly.

                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.