Skip to main content
.NET 8.0+

ListViewProcessCurrentObjectController.ProcessCurrentObjectAction Property

Provides access to the ListViewShowObject Action.

Namespace: DevExpress.ExpressApp.SystemModule

Assembly: DevExpress.ExpressApp.v24.2.dll

NuGet Package: DevExpress.ExpressApp

Declaration

public SimpleAction ProcessCurrentObjectAction { get; }

Property Value

Type Description
SimpleAction

A SimpleAction object representing the Open Action.

Remarks

This Action invokes a Detail View representing the object that is double-clicked in the current List View, or for which ENTER is pressed (the ListViewProcessCurrentObjectController class description contains details on this).

The Open Action’s ActionBase.Category property is set to ListView. This means that the Action must be displayed by the ListView ActionContainer. However, this Action Contianer is not included into built-in Templates. So, the Action is not visualized.

If you want to customize the process of executing the Action, inherit from the ListViewProcessCurrentObjectController and override its ExecuteProcessCurrentObject method. Currently, this method calls the ListViewProcessCurrentObjectController.ShowObject method, which invokes a Detail View.

By default, the ListViewShowObject Action is active when the ListViewProcessCurrentObjectController is active, and when a single object is selected in the current List View. To ascertain why the Action is currently deactivated or disabled, use the DiagnosticInfo Action. If you need to change the Action’s “active” or “enabled” state in code, use its ActionBase.Active or ActionBase.Enabled property, respectively.

using DevExpress.ExpressApp;
using DevExpress.ExpressApp.SystemModule;

namespace YourSolutionName.Module.Controllers;
public class CustomControllerReport : ObjectViewController<ListView, Contact> {
    ListViewProcessCurrentObjectController processObjectController;
    protected override void OnActivated() {
        base.OnActivated();
        processObjectController = Frame.GetController<ListViewProcessCurrentObjectController>();
        if(processObjectController != null) {
            processObjectController.ProcessCurrentObjectAction.Active["myreason"] = false;
        }
    }
    protected override void OnDeactivated() {
        base.OnDeactivated();
        if(processObjectController != null) {
            processObjectController.ProcessCurrentObjectAction.Active.RemoveItem("myreason");
        }
    }
}

Information on the ListViewShowObject Action is available in the Application Model‘s ActionDesign node. To access it, use the Model Editor.

If you require that another Action is executed instead of the Open Action, handle the ListViewProcessCurrentObjectController.CustomProcessSelectedItem event.

See Also