.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+
.NET 5.0+

NewObjectViewController.NewObjectActionItemListMode Property

Specifies the mode for populating the NewObjectViewController.NewObjectAction items list.

Namespace: DevExpress.ExpressApp.SystemModule

Assembly: DevExpress.ExpressApp.v21.2.dll


public NewObjectActionItemListMode NewObjectActionItemListMode { get; set; }

Property Value

Type Description

An NewObjectActionItemListMode enumeration value specifying the mode for populating the New Action’s items list.


Use the following code to change the NewObjectActionItemListMode value in a specific View.

using DevExpress.ExpressApp;
using DevExpress.ExpressApp.SystemModule;
using DevExpress.Persistent.BaseImpl;
// ...
public class CustomizeNewActionItemsListController : ObjectViewController<ObjectView, Task> {
    protected override void OnActivated() {
        NewObjectViewController controller = Frame.GetController<NewObjectViewController>();
        if (controller != null) {
            controller.NewObjectActionItemListMode = NewObjectActionItemListMode.LastDescendantsOnly;

To specify the default value applied in all Views, use the static NewObjectViewController.DefaultNewObjectActionItemListMode field.

The NewObjectActionItemListMode value is ignored in a case when there are no descendants of the current business object type. In the ExcludeBaseType and LastDescendantsOnly modes, the New Action may become inactive if it is impossible to instantiate any of the descendants (e.g., due to the Security System restrictions).

If the modes listed in the NewObjectActionItemListMode enumeration do not fit your requirements, handle the NewObjectViewController.CollectDescendantTypes and NewObjectViewController.CollectCreatableItemTypes events instead of using the NewObjectActionItemListMode property. An example is provided in the How to: Customize the New Action’s Items List topic.

See Also