[Expand]General Information
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Collapse]WPF Controls
 [Expand]What's Installed
 [Expand].NET Core 3 Support
 [Expand]Common Concepts
 [Expand]MVVM Framework
 [Collapse]Controls and Libraries
  [Expand]Data Grid
  [Expand]Ribbon, Bars and Menu
  [Expand]Charts Suite
  [Expand]Pivot Grid
  [Expand]Rich Text Editor
  [Expand]Tree List
  [Expand]Gauge Controls
  [Expand]Map Control
  [Expand]Layout Management
  [Expand]Windows Modern UI
  [Collapse]Data Editors
    Included Components
   [Expand]Implementation Details
   [Expand]Getting Started
   [Expand]Editor Types
   [Collapse]Common Features
    [Collapse]Obtaining Editor Values
      Obtaining Values in Display and Edit Modes
      Synchronizing Values Between Editor and Data Source
    [Expand]Binding to Data
     In-Place Mode
    [Expand]Editor Operation Modes
    [Expand]Masked Input
    [Expand]Input Validation
     Incremental Search
   [Expand]Range Control
   [Expand]Visual Elements
   [Expand]End-User Capabilities
  [Expand]Navigation Controls
  [Expand]Spell Checker
  [Expand]Property Grid
  [Expand]PDF Viewer
  [Expand]TreeMap Control
  [Expand]Gantt Control
  [Expand]Diagram Control
  [Expand]Windows and Utility Controls
   Dialogs, Notifications and Panels
  [Expand]Scheduler (legacy)
 [Expand]Scaffolding Wizard
  Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Report and Dashboard Server
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)

Obtaining Values in Display and Edit Modes

Expanded Display Mode

When the editor is not focused, it is in the Display mode.

The BaseEdit.EditValue property contains the editor's current value as an object whose type can vary widely. The TextEditBase.Text property contains the text representation of the BaseEdit.EditValue property. The BaseEdit.DisplayText property contains the text that is displayed by the editor in Display mode.

See the example below:

Expanded Edit Mode

When the editor is focused, it is in the Edit mode. In this mode, the end-user can change the editor's value manually. The changes made by the end-user are posted to the BaseEdit.EditValue only after the Input Validation succeeds; otherwise, the BaseEdit.EditValue property contains its previous valid value.

The BaseEdit.EditCore property can be used to obtain the text that is displayed by the editor in the Edit mode. For example, to obtain the text that is displayed by the TextEdit in the Edit mode, use the following code:

Note that, by default, in edit mode, the type of the object returned by the BaseEdit.EditCore property depends on the editor type. This property contains a control specified by the BaseEdit.EditTemplate property. The table below shows the corresponding types of BaseEdit.EditCore property values for specific editor types, by default.

Editor Type BaseEdit.EditCore Type
TextEdit System.Windows.Controls.TextBox
ListBoxEdit DevExpress.Xpf.Editors.Popups.EditorListBox
ComboBoxEdit System.Windows.Controls.TextBox

Is this topic helpful?​​​​​​​