XafApplication.CreateDetailView(Object, Boolean) Method

Creates a Detail View based on information specified in the Application Model for the type of the specified object.

Namespace: DevExpress.ExpressApp

Assembly: DevExpress.ExpressApp.v18.2.dll

Declaration

[Browsable(false)]
public DetailView CreateDetailView(
    object obj,
    bool isRoot
)
<Browsable(False)>
Public Function CreateDetailView(
    obj As Object,
    isRoot As Boolean
) As DetailView

Parameters

Type Name Description
Object obj

An object whose Detail View will be created, and which will be passed to the DetailView.CurrentObject property. This object should support the IObjectSpaceLink interface. The Object Space specified by the IObjectSpaceLink.ObjectSpace property will be assigned to View.ObjectSpace.

Boolean isRoot

true, if the created Detail View is independent and owns the Object Space of the obj object; false, if the created Detail View is nested to another root View that owns the Object Space. This value is assigned to the View.IsRoot property.

Returns

Type Description
DetailView

A Detail View of the object passed as the obj parameter.

Remarks

Use this method to create a Detail View for the object specified by the obj parameter. The information on the created Detail View is taken from the Application Model' node specified by the IModelClass.DefaultDetailView property of the corresponding IModelClass node.

The obj object should support the IObjectSpace interface to provide access to its Object Space. You can use another overload of this method that takes the objectSpace parameter to specify the Object Space manually.

Pass true to the isRoot parameter if the created View should be the owner of the obj object's Object Space. If this Object Space already belongs to another View, pass false.

For an example of how to create and show a Detail View, refer to the How to: Create and Show a Detail View of the Selected Object in a Popup Window topic.

See Also