XafApplication.DetailViewCreating Event

Occurs when creating a Detail View.

Namespace: DevExpress.ExpressApp

Assembly: DevExpress.ExpressApp.v18.1.dll

Syntax

public event EventHandler<DetailViewCreatingEventArgs> DetailViewCreating

The event handler receives an argument of the DetailViewCreatingEventArgs type. The DetailViewCreatingEventArgs properties provide information specific to this event.

Handle this event to provide a custom Detail View instead of a default one. Use the handler's ViewCreatingEventArgs.ViewID parameter to get information on the created Detail View. To do this use the application's XafApplication.FindModelView method passing the View ID as a parameter. To specify the Detail View's current object use the handler's DetailViewCreatingEventArgs.Obj parameter. Create the Detail View in the Object Space passed as the handler's ViewCreatingEventArgs.ObjectSpace parameter.