Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Document Server
[Expand]Reporting
[Expand]Report Server
[Expand]Dashboard
[Collapse]eXpressApp Framework
 [Expand]Fundamentals
 [Expand]Getting Started
 [Expand]Concepts
 [Expand]Design-Time Features
 [Expand]Functional Testing
 [Expand]Deployment
 [Expand]Task-Based Help
 [Expand]Frequently Asked Questions
 [Collapse]API Reference
  [Expand]DevExpress.EasyTest.Framework
  [Expand]DevExpress.ExpressApp
  [Expand]DevExpress.ExpressApp.Actions
  [Expand]DevExpress.ExpressApp.AuditTrail
  [Expand]DevExpress.ExpressApp.Chart
  [Expand]DevExpress.ExpressApp.Chart.Web
  [Expand]DevExpress.ExpressApp.Chart.Win
  [Expand]DevExpress.ExpressApp.CloneObject
  [Expand]DevExpress.ExpressApp.ConditionalAppearance
  [Expand]DevExpress.ExpressApp.Dashboards
  [Expand]DevExpress.ExpressApp.Dashboards.Web
  [Expand]DevExpress.ExpressApp.Dashboards.Win
  [Expand]DevExpress.ExpressApp.Data
  [Expand]DevExpress.ExpressApp.DC
  [Expand]DevExpress.ExpressApp.DC.ClassGeneration
  [Collapse]DevExpress.ExpressApp.Editors
   [Expand]ActionContainerViewItem Class
   [Expand]ColumnsListEditor Class
   [Expand]CreateCustomModelSynchronizerEventArgs Class
   [Expand]CriteriaObjectTypeMemberAttribute Class
   [Expand]CriteriaOptionsAttribute Class
   [Expand]DashboardViewItem Class
    EditMaskType Enumeration
   [Expand]EditorAliases Structure
   [Expand]EditorDescriptorsFactory Class
   [Expand]IAppearanceEnabled Interface
   [Expand]IAppearanceFormat Interface
   [Expand]IAppearanceVisibility Interface
   [Expand]IComplexControl Interface
   [Expand]IComplexListEditor Interface
   [Expand]IComplexViewItem Interface
   [Expand]IModelRegisteredPropertyEditor Interface
   [Expand]IModelRegisteredPropertyEditors Interface
   [Expand]IModelRegisteredViewItem Interface
   [Expand]IModelRegisteredViewItems Interface
   [Expand]INotifyAppearanceVisibilityChanged Interface
   [Expand]ListEditor Class
   [Expand]ListEditorAttribute Class
   [Expand]ModelRegisteredViewItemsGenerator Class
   [Expand]PropertyEditor Class
   [Expand]PropertyEditorAttribute Class
    StaticHorizontalAlign Enumeration
   [Expand]StaticImage Class
   [Expand]StaticText Class
    StaticVerticalAlign Enumeration
    ViewEditMode Enumeration
   [Collapse]ViewItem Class
     ViewItem Members
     ViewItem Constructor
    [Expand]ViewItem Properties
    [Expand]ViewItem Events
    [Expand]ViewItem Methods
   [Expand]ViewItemAttribute Class
    ViewItemVisibility Enumeration
  [Expand]DevExpress.ExpressApp.EF
  [Expand]DevExpress.ExpressApp.EF.Utils
  [Expand]DevExpress.ExpressApp.FileAttachments.Web
  [Expand]DevExpress.ExpressApp.FileAttachments.Win
  [Expand]DevExpress.ExpressApp.Filtering
  [Expand]DevExpress.ExpressApp.HtmlPropertyEditor.Web
  [Expand]DevExpress.ExpressApp.HtmlPropertyEditor.Win
  [Expand]DevExpress.ExpressApp.Kpi
  [Expand]DevExpress.ExpressApp.Layout
  [Expand]DevExpress.ExpressApp.Maps.Mobile
  [Expand]DevExpress.ExpressApp.Maps.Mobile.Editors
  [Expand]DevExpress.ExpressApp.Maps.Web
  [Expand]DevExpress.ExpressApp.Maps.Web.Helpers
  [Expand]DevExpress.ExpressApp.MiddleTier
  [Expand]DevExpress.ExpressApp.Mobile.Editors
  [Expand]DevExpress.ExpressApp.Mobile.SystemModule
  [Expand]DevExpress.ExpressApp.Model
  [Expand]DevExpress.ExpressApp.Model.Core
  [Expand]DevExpress.ExpressApp.Model.NodeGenerators
  [Expand]DevExpress.ExpressApp.ModelEditor
  [Expand]DevExpress.ExpressApp.Notifications
  [Expand]DevExpress.ExpressApp.Notifications.Web
  [Expand]DevExpress.ExpressApp.Notifications.Win
  [Expand]DevExpress.ExpressApp.PivotChart
  [Expand]DevExpress.ExpressApp.PivotChart.Web
  [Expand]DevExpress.ExpressApp.PivotChart.Win
  [Expand]DevExpress.ExpressApp.PivotGrid
  [Expand]DevExpress.ExpressApp.PivotGrid.Web
  [Expand]DevExpress.ExpressApp.PivotGrid.Win
  [Expand]DevExpress.ExpressApp.Reports
  [Expand]DevExpress.ExpressApp.Reports.Web
  [Expand]DevExpress.ExpressApp.Reports.Win
  [Expand]DevExpress.ExpressApp.ReportsV2
  [Expand]DevExpress.ExpressApp.ReportsV2.Web
  [Expand]DevExpress.ExpressApp.ReportsV2.Win
  [Expand]DevExpress.ExpressApp.Scheduler
  [Expand]DevExpress.ExpressApp.Scheduler.Web
  [Expand]DevExpress.ExpressApp.Scheduler.Win
  [Expand]DevExpress.ExpressApp.ScriptRecorder
  [Expand]DevExpress.ExpressApp.ScriptRecorder.Web
  [Expand]DevExpress.ExpressApp.ScriptRecorder.Win
  [Expand]DevExpress.ExpressApp.Security
  [Expand]DevExpress.ExpressApp.Security.Adapters
  [Expand]DevExpress.ExpressApp.Security.ClientServer.Wcf
  [Expand]DevExpress.ExpressApp.Security.EF.Adapters
  [Expand]DevExpress.ExpressApp.Security.Strategy
  [Expand]DevExpress.ExpressApp.Security.Xpo.Adapters
  [Expand]DevExpress.ExpressApp.StateMachine
  [Expand]DevExpress.ExpressApp.SystemModule
  [Expand]DevExpress.ExpressApp.Templates
  [Expand]DevExpress.ExpressApp.Templates.ActionContainers
  [Expand]DevExpress.ExpressApp.TreeListEditors
  [Expand]DevExpress.ExpressApp.TreeListEditors.Web
  [Expand]DevExpress.ExpressApp.TreeListEditors.Win
  [Expand]DevExpress.ExpressApp.Updating
  [Expand]DevExpress.ExpressApp.Utils
  [Expand]DevExpress.ExpressApp.Validation
  [Expand]DevExpress.ExpressApp.Validation.Web
  [Expand]DevExpress.ExpressApp.Validation.Win
  [Expand]DevExpress.ExpressApp.ViewVariantsModule
  [Expand]DevExpress.ExpressApp.Web
  [Expand]DevExpress.ExpressApp.Web.Controls
  [Expand]DevExpress.ExpressApp.Web.Editors
  [Expand]DevExpress.ExpressApp.Web.Editors.ASPx
  [Expand]DevExpress.ExpressApp.Web.SystemModule
  [Expand]DevExpress.ExpressApp.Web.Templates
  [Expand]DevExpress.ExpressApp.Web.Utils
  [Expand]DevExpress.ExpressApp.Win
  [Expand]DevExpress.ExpressApp.Win.Core
  [Expand]DevExpress.ExpressApp.Win.Editors
  [Expand]DevExpress.ExpressApp.Win.Model
  [Expand]DevExpress.ExpressApp.Win.SystemModule
  [Expand]DevExpress.ExpressApp.Win.Templates
  [Expand]DevExpress.ExpressApp.Win.Templates.Navigation
  [Expand]DevExpress.ExpressApp.Workflow
  [Expand]DevExpress.ExpressApp.Workflow.Win
  [Expand]DevExpress.ExpressApp.Xpo
  [Expand]DevExpress.Persistent.Base
  [Expand]DevExpress.Persistent.Base.General
  [Expand]DevExpress.Persistent.Base.ReportsV2
  [Expand]DevExpress.Persistent.Base.Security
  [Expand]DevExpress.Persistent.BaseImpl
  [Expand]DevExpress.Persistent.BaseImpl.EF
  [Expand]DevExpress.Persistent.BaseImpl.EF.PermissionPolicy
  [Expand]DevExpress.Persistent.BaseImpl.PermissionPolicy
  [Expand]DevExpress.Persistent.Validation
[Expand]CodeRush
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
[Expand]End-User Documentation

ViewItem Class

Represents a base class for View Items.

Namespace:DevExpress.ExpressApp.Editors
Assembly:DevExpress.ExpressApp.v17.1.dll

Expanded Syntax

Expanded Remarks

The ViewItem class implements basic functionality for items that can be contained in a Detail View. This functionality includes:

  • The capability to display View Items via a specified control in a UI. Basically, a Detail View's representation in a UI is a set of controls that display View Items.
    See the following members: Control, CreateControl, ControlCreating and ControlCreated.
  • A View Item can be related to the object that the parent Detail View presents. For instance, the PropertyEditor, being the ViewItem class' descendant, represents the properties of the object presented by the Detail View.
    See the CurrentObject and ObjectType.
  • A View Item can be refreshed when the parent Detail View is refreshed. Refreshing is assumed to be data related.
    See Refresh.
  • The capability to save the current settings of the control to the Application Model, so that the next time the control is created the same settings are used.
    See SaveModel.

To access the Detail View in which a View Item is contained, use the View property.

The eXpressApp Framework ships with the following descendants of the ViewItem class:

To implement a custom View Item, inherit from the ViewItem class. The following protected members that are not described in the documentation can be overridden:

Member

Description

CreateControlCore Called by the CreateControl method. You should return the control that will represent your View Item in a UI.
SaveModelCore Called by the SaveModel method. You can override it to save the settings of a View Item and its control to the Application Model. This allows display of the View Item in the same manner as it was before it was recreated.
Dispose Called by the Dispose method. Override it if you need to dispose custom allocated resources.
OnCurrentObjectChanging and OnCurrentObjectChanged Called when the CurrentObject property is changed.
OnControlCreating and OnControlCreated Called when a control (see Control) is created. Raise the ControlCreating and ControlCreated events.
Note

A custom View Item should be implemented in a module project and decorated with the ViewItemAttribute. In this instance, it will be loaded to the Application Model, which means that you will be able to use it in a UI. Additionally, the module should be UI-specific, because the View Item creates a UI-specific control.

For details on View Items and basics on how to implement custom ones, refer to the View Items and Implement Custom View Items topics. For an example of a custom View Item, refer to the How to: Implement a View Item topic.

To access a View Item of the View for which a Controller is activated, handle the Controller.Activated and ControlCreated events, as it is demonstrated in the Access Editor Settings tutorial.

Expanded Inheritance Hierarchy

System.Object
    ViewItem
       ActionContainerViewItem
       DevExpress.ExpressApp.Web.Editors.ASPx.ASPxObjectPropertyEditor
       DevExpress.ExpressApp.Web.Editors.ASPx.ASPxObjectPropertyEditorBase
       ASPxPropertyEditor
       ControlDetailItem
       ControlViewItem
       DashboardViewItem
       DXPropertyEditor
       DevExpress.ExpressApp.Mobile.Editors.ListGroupViewItem
       DevExpress.ExpressApp.Mobile.Editors.ListRowViewItem
       MobileMapsPropertyEditor
       DevExpress.ExpressApp.Mobile.Editors.MobileObjectPropertyEditor
       DevExpress.ExpressApp.Mobile.Editors.MobileObjectPropertyEditorBase
       DevExpress.ExpressApp.Mobile.Editors.MobilePropertyEditor
       PropertyEditor
       ReportDesignerDetailItem
       ReportViewerDetailItem
       ReportWebViewerDetailItem
       StaticImage
       StaticImageDetailItem
       StaticImageDetailItem
       DevExpress.ExpressApp.Win.Editors.StaticImageViewItem
       DevExpress.ExpressApp.Web.Editors.StaticImageViewItem
       StaticText
       StaticTextDetailItem
       StaticTextDetailItem
       StaticTextViewItem
       StaticTextViewItem
       WebActionContainerViewItem
       WebCustomUserControlViewItem
       WebDashboardViewerViewItem
       WebMapsPropertyEditor
       WebPropertyEditor
       WinActionContainerViewItem
       WinDashboardViewerViewItem
       WinPropertyEditor

Expanded See Also

How would you rate this topic?​​​​​​​