The requested page is not available for the requested platform. You are viewing the content for .NET Framework 4.5.2+ platform.
.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+
.NET Core 3.0+

ViewItem.Id Property

Gets the identifier of the current View Item.

Namespace: DevExpress.ExpressApp.Editors

Assembly: DevExpress.ExpressApp.v19.2.dll

Declaration

public virtual string Id { get; }
Public Overridable ReadOnly Property Id As String
public virtual string Id { get; }
Public Overridable ReadOnly Property Id As String
public virtual string Id { get; }
Public Overridable ReadOnly Property Id As String

Property Value

Type Description
String

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

Property Value

Type Description
String

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

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