Ticket T254050
Visible to All Users

click on row, popup detail

created 10 years ago (modified 10 years ago)

Hi

I know how to create a popup window with an action button. But what I want to do is create a popup detail window when I click on a record in a listview.

How do I do this?

C#
[ CollectionOperationSet(AllowAdd = false, AllowRemove = false)] [ XafDisplayName("Comments")] publicXPCollection<ObjectComments> ObjectComments { get { // return GetCollection<ObjectComments>("ObjectComments"); if (_objectComments == null) { _objectComments = newXPCollection<ObjectComments>(Session); _objectComments.BindingBehavior = CollectionBindingBehavior.AllowNone; } _objectComments.Criteria = CriteriaOperator.Parse("SourceObjectGuid = ?", driverGuid); return _objectComments; } }

Thanks

Answers approved by DevExpress Support

created 10 years ago

Hi Brent,

To accomplish this task, implement a ViewController, access the ListViewProcessCurrentObjectController object, and handle its CustomProcessSelectedItem event.
For example:

C#
public partial class ViewController1 : ViewController<ListView>{ public ViewController1() { InitializeComponent(); TargetObjectType = typeof(Contact); } protected override void OnActivated() { base.OnActivated(); ListViewProcessCurrentObjectController lvpcoc = this.Frame.GetController<ListViewProcessCurrentObjectController>(); if(lvpcoc != null) lvpcoc.CustomProcessSelectedItem += new EventHandler<CustomProcessListViewSelectedItemEventArgs>(lvpcoc_CustomProcessSelectedItem); } void lvpcoc_CustomProcessSelectedItem(object sender, CustomProcessListViewSelectedItemEventArgs e) { e.InnerArgs.ShowViewParameters.TargetWindow = TargetWindow.NewModalWindow; } protected override void OnDeactivated() { ListViewProcessCurrentObjectController lvpcoc = this.Frame.GetController<ListViewProcessCurrentObjectController>(); if (lvpcoc != null) lvpcoc.CustomProcessSelectedItem -= new EventHandler<CustomProcessListViewSelectedItemEventArgs>(lvpcoc_CustomProcessSelectedItem); base.OnDeactivated(); } }

Please review the How to: Replace a List View's Default Action article in help to learn more.
If you need to show this DetailView in EditMode, you can add another ViewController as it is described in the How to: Display a Detail View Directly in Edit Mode in ASP.NET Applications help article.

    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.