Back to Devexpress

View.Id Property

expressappframework-devexpress-dot-expressapp-dot-view-a25b6106.md

latest5.4 KB
Original Source

View.Id Property

Returns a View‘s ID.

Namespace : DevExpress.ExpressApp

Assembly : DevExpress.ExpressApp.v25.2.dll

NuGet Package : DevExpress.ExpressApp

Declaration

csharp
public string Id { get; protected set; }
vb
Public Property Id As String

Property Value

TypeDescription
String

A string value representing the current View’s ID.

|

Remarks

By default, this property is set to the value of the ID property from the Application Model node specified by the View.Model property.

The following code snippets (auto-collected from DevExpress Examples) contain references to the Id 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.

xaf-how-to-save-the-currently-opened-view-as-a-new-view-variant-at-runtime/CS/EF/ViewVariantSaveEF/ViewVariantSaveEF.Module/Controllers/UserViewVariantsController.cs#L101

csharp
VariantsInfo variantsInfo = GetVariantsInfo();
    return variantsInfo != null ? variantsInfo.RootViewId : View.Id;
}

xaf-save-and-share-custom-view-settings/CS/EFCore/ViewSettingsEF/ViewSettingsEF.Module/Controllers/ViewVariantsController.cs#L67

csharp
lastSelectedItem = null;
CriteriaOperator criteria = CriteriaOperator.Parse("([ViewId] = ?) And ([IsShared] Or [OwnerId] is null Or [OwnerId] = ?)", View.Id, SecuritySystem.CurrentUserId.ToString());
IObjectSpace objectSpace = Application.CreateObjectSpace(typeof(SettingsStore));

xaf-how-to-implement-dependent-views-in-a-dashboardview-filter-based-on-selection/CS/EFCore/DependentDashboardEF/DependentDashboardEF.Module/Controllers/DashboardFilterController.cs#L48

csharp
base.OnActivated();
if (View.Id == DashboardViewId) {
    SourceItem = (DashboardViewItem)View.FindItem(FilterSourceID);

xaf-how-to-create-information-panels/CS/InfoPanels.Module.Win/DetailViewForm.cs#L17

csharp
if (View != null) {
    return TemplatesHelper.GetFormStateNode(View.Id);
}

xaf-how-to-access-the-master-detailview-information-from-a-nested-listview-controller/CS/WinWebSolution.Module/Controllers/MasterDetailViewControllerBase.cs#L29

csharp
if (c is IMasterDetailViewInfo) {
    ((IMasterDetailViewInfo)c).AssignMasterDetailViewId(View.Id);
}

xaf-how-to-create-information-panels/VB/InfoPanels.Module.Win/DetailViewForm.vb#L28

vb
If View IsNot Nothing Then
    Return TemplatesHelper.GetFormStateNode(View.Id)
Else

xaf-how-to-access-the-master-detailview-information-from-a-nested-listview-controller/VB/WinWebSolution.Module/Controllers/MasterDetailViewControllerBase.vb#L33

vb
If TypeOf c Is IMasterDetailViewInfo Then
    CType(c, IMasterDetailViewInfo).AssignMasterDetailViewId(View.Id)
End If

See Also

Model

Caption

View Class

View Members

DevExpress.ExpressApp Namespace