Skip to main content
A newer version of this page is available. .

ViewItem.Id Property

Gets the identifier of the current View Item.

Namespace: DevExpress.ExpressApp.Editors

Assembly: DevExpress.ExpressApp.v18.2.dll

Declaration

public virtual string Id { get; }

Property Value

Type Description
String

A string value representing the current View Item’s identifier.

Remarks

This property can be overridden in the ViewItem class’ descendants.

Use this property to identify a View Item or Property Editor in a Controller as shown below:

using DevExpress.ExpressApp;
using DevExpress.ExpressApp.Editors;
using DevExpress.ExpressApp.Layout;
// ...
public class MyViewController : ViewController<DetailView> {
    protected override void OnActivated() {
        base.OnActivated();
        foreach (ViewItem item in View.Items) {
            if ((item is ControlViewItem) && item.Id == "Item1") { /*...*/ }
        }
    }
    // ...
}
See Also