The requested page is not available for the requested platform. You are viewing the content for Default platform.

ViewItem.View Property

Specifies the Detail View that contains the current View Item.

Namespace: DevExpress.ExpressApp.Editors

Assembly: DevExpress.ExpressApp.v19.1.dll

Declaration

public CompositeView View { get; set; }
Public Property View As CompositeView

Property Value

Type Description
CompositeView

A CompositeView object representing the Detail View where the current View Item is created.

Remarks

Use this property to access the current View Item's Detail View. The following code snippet demonstrates how to do this:

using DevExpress.ExpressApp;
using DevExpress.ExpressApp.Editors;
// ...
public class MyViewController : ViewController<DetailView> {
    protected override void OnActivated() {
        base.OnActivated();
        ViewItem viewItem = View.FindItem("FirstName");
        DetailView detailView = (DetailView)viewItem.View;
    }
    // ...
}

For instance, the ViewItem.Control's properties can be specified dependent on the View's settings; or you can get the View's View.ObjectSpace.

The View property is initialized in Detail Views only. If the current View Item is a Property Editor in an editable List View, is necessary to implement the IGridInplaceEdit interface in the underlying control to access the currently edited row. GridListEditor automatically assigns the IGridInplaceEdit.GridEditingObject property when the inplace editor is shown. In other List Editors, you should manually handle corresponding control events to set the GridEditingObject property when an editor control is being shown. Built-in Property Editors that support this mechanism are LookupPropertyEditor, ObjectPropertyEditor, PopupCriteriaPropertyEditor and ExpressionPropertyEditor.

See Also