The NewObjectViewController is intended for presenting the New Action.
In a Windows Forms application:
In an ASP.NET application:
For details on the New Action, refer to the description of the NewObjectViewController.NewObjectAction property that provides access to this Action.
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.
If you need to inherit from the NewObjectViewController, the following protected virtual methods are available:
When is it called?
Invoked as a result of calling the New method before creating a new object of the chosen type.
Raises the NewObjectViewController.ObjectCreating event.
Invoked as a result of calling the New method after the new object has been created, but not added to the current object collection.
Raises the NewObjectViewController.CustomAddObjectToCollection event.
Invoked as a result of calling the New method after the new object has been created and added to the current object collection. If the ObjectCreatedEventArgs.ShowDetailView property is set to true, a Detail View with the new object is invoked after calling this method.
Raises the NewObjectViewController.ObjectCreated event.
When the New Action's SingleChoiceAction.Execute event is raised.
Called when the NewObjectViewController is activated. In addition, it is called when the current ListView's CollectionSource is changed, and when the current View's View.AllowNew property is changed. In this Controller's platform-specific descendants, this method is overridden to populate the New Action's ChoiceActionBase.Items collection.
Public members are described individually in the documentation.
Inherit from the DevExpress.ExpressApp.Win.SystemModule.WinNewObjectViewController or DevExpress.ExpressApp.Web.SystemModule.WebNewObjectViewController class, if you need to implement a UI-specific behavior.
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.