Skip to main content
A newer version of this page is available. .
.NET Framework 4.5.2+

View.IsRoot Property

Specifies whether a View is root.

Namespace: DevExpress.ExpressApp

Assembly: DevExpress.ExpressApp.v19.2.dll

Declaration

public bool IsRoot { get; set; }

Property Value

Type Description
Boolean

true, if the current View is root; otherwise, false.

Remarks

A View is root if it is created in an individual Object Space. A root View can be shown within a Window or DashboardViewItem. When a View is not root, objects changes are saved to the database when the root View is saved. For instance, Lookup Property Editors and List Property Editors contain nested views - their IsRoot property is set to false. So, object changes made using these Property Editors are saved to the database when the root View is saved.

Use this property to determine whether a View is root when you create an Action or try to use the View’s View.ObjectSpace.

Note, that it is not necessary to set the IsRoot property to false when it is required to show a Detail View containing unsaved changes from the current View and changes should not be saved to the database after committing the created DetailView. In this case, create a nested Object Space using the XafApplication.CreateNestedObjectSpace method. Unsaved changes can be loaded to a nested Object Space through its GetObject method. When a nested Object Space is committed, changes are written to the parent Object Space.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the IsRoot 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