Skip to main content
.NET Framework 4.6.2+

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

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