Ticket T451198
Visible to All Users

How to the DetailView in a pop-up window when adding new or editing the existing object in the Nested ListView

created 8 years ago (modified 8 years ago)

Hi,

I have a little issue that I can not find the solution.
I have a root detail view in view mode and with CollectionsEditMode View, with all its tabs nested listviews.
 - when nested listview records are selected are shown in the main window (not in popup)
 - when nested listview records are selected to edit (only one) are shown in the main window (not in popup)

the first case I solved it with this code:

C#
Frame.GetController<ListViewProcessCurrentObjectController>().CustomizeShowViewParameters += _CustomizeShowViewParameters; private void _CustomizeShowViewParameters(object sender, CustomizeShowViewParametersEventArgs e) { e.ShowViewParameters.TargetWindow = TargetWindow.NewModalWindow; }

How can I catch the edit object or new object action to show them in popup? Because that  CustomizeShowViewParameters is only for this controller, right?

Thanks in advance

Comments (1)
DevExpress Support Team 8 years ago

    Hello Juan,

    Thank you for the detailed information.  We need additional time to research it.  We will get back to you once we have any results or need extra information.  Your patience is appreciated.

    Answers approved by DevExpress Support

    created 8 years ago (modified 4 years ago)

    Hello Juan Jose,

    There are two ways to accomplish this task:

    1. To change this behavior in the entire application, create a custom Show View Strategy (a DevExpress.ExpressApp.Web.ShowViewStrategy's descendant) and override its ShowViewFromNestedView method as follows:

    C#
    protected override void ShowViewFromNestedView(ShowViewParameters parameters, ShowViewSource showViewSource) { ShowDialog(parameters, showViewSource); }

    Then, assign this Show View Strategy to the XafApplication.ShowVIewStrategy property at the applicaiton startup.
    2. To change this behavior only in a certain ListView, handle the NewObjectViewController.NewObjectAction.Execute and ListViewController.EditAction.Execute events and set the e.ShowViewParameters.TargetWindow property to NewModalWindow.

    Feel free to contact us if you need further assistance.

      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.