Skip to main content
.NET Framework 4.5.2+

ViewItem.View Property

Specifies the Detail View that contains the current View Item.

Namespace: DevExpress.ExpressApp.Editors

Assembly: DevExpress.ExpressApp.v22.1.dll

Declaration

public CompositeView View { get; set; }

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.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the View property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also