NewObjectViewController Class
A ViewController descendant that contains the New Action.
Namespace: DevExpress.ExpressApp.SystemModule
Assembly: DevExpress.ExpressApp.v24.2.dll
NuGet Package: DevExpress.ExpressApp
Declaration
Remarks
NewObjectViewController
displays the New Action.
- ASP.NET Core Blazor
- Windows Forms
- ASP.NET Web Forms
Note
In ASP.NET Core Blazor, the New Action is not available in Detail Views.
Note
In Many-to-Many collections, the New Action is hidden when NewObjectViewController.LinkNewObjectToParentImmediately is set to true
.
For more information about the New Action, refer to the NewObjectViewController.NewObjectAction property description.
To customize the default behavior of the New Action, you can inherit from this Controller or subscribe to its events. In addition, you can access the Action to modify its behavior.
Platform | Descendant |
---|---|
ASP.NET Core Blazor | BlazorModificationsController |
Windows Forms | WinModificationsController |
ASP.NET Web Forms | WebModificationsController |
If you need to inherit from the NewObjectViewController, the following protected virtual methods are available:
Method | Trigger Action | Description |
---|---|---|
| After the | Raises the NewObjectViewController.ObjectCreating event. |
| After the object has been created, but before it is added to the object collection. | Raises the NewObjectViewController.CustomAddObjectToCollection event. |
| After the new object has been created and added to the object collection. If the | Raises the NewObjectViewController.ObjectCreated event. |
| The New Action’s SingleChoiceAction.Execute event. |
|
|
|
|
To ascertain whether the Controller is active, use the Controller.Active property (see How to: Detect a Lookup List View in Code). If you need to know the reason for its deactivation or activation at runtime, use the DiagnosticInfo Action.
Information about the NewObjectViewController
and its New
Action is available in the Application Model. To access it, use the Model Editor.