Skip to main content
.NET 6.0+

DevExpress v24.1 Update — Your Feedback Matters

Our What's New in v24.1 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

View.IsRoot Property

Specifies whether a View is root.

Namespace: DevExpress.ExpressApp

Assembly: DevExpress.ExpressApp.v24.1.dll

NuGet Package: DevExpress.ExpressApp

#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.

See Also