Skip to main content
.NET Framework 4.6.2+

ViewItem.Id Property

Gets the identifier of the current View Item.

Namespace: DevExpress.ExpressApp.Editors

Assembly: DevExpress.ExpressApp.v24.2.dll

NuGet Package: DevExpress.ExpressApp

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