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
 [Collapse]Concepts
  [Expand]Application Solution Components
  [Collapse]Business Model Design
    Business Model Design Basics
    Built-in Business Classes for Most Popular Scenarios
   [Expand]Business Model Design with Entity Framework
   [Expand]Business Model Design with XPO
    Non-Persistent Objects
    PropertyChanged Event in Business Classes
   [Collapse]Data Types Supported by built-in Editors
     Key Properties
    [Collapse]String Properties
      String Properties in XPO
      String Properties in Entity Framework
      String Properties in Domain Components
    [Expand]Numeric Properties
    [Expand]Date and Time Properties
    [Expand]Boolean Properties
    [Expand]BLOB Image Properties
    [Expand]Collection Properties
    [Expand]Reference (Foreign Key, Complex Type) Properties
    [Expand]File Attachment Properties
    [Expand]Type Properties
    [Expand]Enumeration Properties
    [Expand]Criteria Properties
    [Expand]Color Properties
     Geolocation Properties
     Miscellaneous Property Types
    Mapping Complex Types to the Database
   [Expand]Types Info Subsystem
    Connect an XAF Application to a Database Provider
    Data Annotations in Data Model
    Create and Update the Application's Database
  [Expand]Application Model
  [Expand]UI Construction
  [Expand]Extend Functionality
  [Expand]Data Manipulation and Business Logic
  [Expand]Security System
  [Expand]Localization
  [Expand]System Module
  [Expand]Extra Modules
  [Expand]Debugging and Error Handling
  [Expand]Filtering
  [Expand]Application Life Cycle
 [Expand]Design-Time Features
 [Expand]Functional Testing
 [Expand]Deployment
 [Expand]Task-Based Help
 [Expand]Frequently Asked Questions
 [Expand]API Reference
[Expand]CodeRush
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
[Expand]End-User Documentation

String Properties

Depending on the attributes applied to a string property and the corresponding settings specified in the Application Model, a string property is displayed differently.

  • String properties with a fixed length (e.g., 100 or 15 characters) are displayed in a text editor.
  • Large string properties are displayed in a memo editor. By default, these properties are not displayed in List Views.
  • String properties with a StringCompressionConverter Value Converters assigned are stored in the database in a compressed form (for XPO and Domain Components only).
  • You can use the Delayed Loading feature to improve performance when handling unlimited size properties (for XPO and Domain Components only).
  • If predefined values are specified in the Application Model (see IModelCommonMemberViewItem.PredefinedValues), string properties are displayed in a combo box editor.
  • String properties with an HTML-formatted text values can be displayed in HTML Property Editors Editor (Windows Forms or ASP.NET)

Windows Forms

ASP.NET

Note

To see String Property Editors in action, refer to the Property Editors | String Properties section in the Feature Center demo installed with XAF. By default, the Feature Center demo is installed in %PUBLIC%\Documents\DevExpress Demos 17.1\Components\eXpressApp Framework\FeatureCenter. The ASP.NET version of this demo is available online at http://demos.devexpress.com/XAF/FeatureCenter/.

Expanded Windows Forms Property Editors for String Properties

Each WinForms Property Editor has a control that displays a corresponding property in a Detail View, and a repository item that displays a property in a List Editor that supports in-place editing. The table below shows both the control and repository item.

Property Editor Type and Description Control Repository Item

StringPropertyEditor

Used for string properties by default.
The StringEdit control and the RepositoryItemStringEdit repository item are used when the corresponding BOModel | <Class> | OwnMembers | <Member> node's RowCount property is set to 0 (the property's default value).
The PredefinedValuesStringEdit control and RepositoryItemPredefinedValuesStringEdit repository items are used when the corresponding BOModel | <Class> | OwnMembers | <Member> node's RowCount property is set to 0 and the PredefinedValues property is specified. To expand the control's drop-down window, use Alt + Down Arrow.
The LargeStringEdit control and RepositoryItemMemoExEdit repository items are used when the corresponding BOModel | <Class> | OwnMembers | <Member> node's RowCount property is not set to 0.
Note: The StringEdit control and the RepositoryItemStringEdit repository item can be used to display a non-string property. For this purpose, you should assign the DevExpress.ExpressApp.Win.Editors.StringPropertyEditor Property Editor for the required BOModel | <Class> | OwnMembers | <Member> node's PropertyEditorType property. In this instance, the property's textual representation will be displayed in the StringEdit control.
The StringPropertyEditor has the EditMaskType property. By default, it is set to the value of the Views | <DetailView> | Items | <PropertyEditor> node's EditMaskType property. In the Model Editor, you can set this property to the Simple or RegEx value. Set it to the Simple value if you need to set the Property Editor's EditMask property or the PropertyEditor node's EditMask property to a mask with a simplified syntax. Set it to the RegEx value if you need to set the EditMask property to a mask using a full-function regular expression. Note that the EditMaskType and EditMask properties are only considered by the RepositoryItemStringEdit and RepositoryItemPredefinedValuesStringEdit repository items. For details on masks, refer to the Masks Types section of the Mask Editors Overview topic.
StringEdit - a descendant of the TextEdit editor from the XtraEditors Library
or
PredefinedValuesStringEdit - a descendant of the ComboBoxEdit editor from the XtraEditors Library
or
LargeStringEdit - a descendant of the MemoEdit editor from the XtraEditors Library
RepositoryItemStringEdit - a descendant of the RepositoryItemTextEdit repository item from the XtraEditors Library
or
RepositoryItemPredefinedValuesStringEdit - a descendant of the RepositoryItemComboBox repository item from the XtraEditors Library
or
RepositoryItemMemoExEdit repository item from the XtraEditors Library

HTMLPropertyEditor

Intended for string properties and should be used in Detail Views only. To use it, assign it to the PropertyEditorType property of the required Views | <DetailView> | Items | <PropertyEditor> node. This Property Editor is supplied with the HTML Property Editor Module.

Using this Property Editor, you can visually format a string with HTML tags. There are two tabs. The Design tab has the instrument panel that allows you to format a string using HTML tags. The HTML tab displays plain HTML code.

HTMLEditor that is a descendant of the System.Windows.Forms.UserControl RepositoryItemHtmlStringEdit that is a descendant of the RepositoryItemTextEdit repository item from the XtraEditors Library

Expanded ASP.NET Property Editors for String Properties

Each ASP.NET Property Editor has controls that display a property in a Detail View's View mode and in an Edit mode (see DetailView.ViewEditMode). These controls are listed in the table below.

Property Editor Type and Description

Control Used in View Mode

Control Used in Edit Mode

ASPxStringPropertyEditor

Used for string properties by default.
The ASPxTextBox control is used when the corresponding BOModel | <Class> | OwnMembers | <Member> node's IModelCommonMemberViewItem.RowCount property is set to 0 (the property's default value).
The ASPxMemo control is used when the corresponding BOModel | <Class> | OwnMembers | <Member> node's IModelCommonMemberViewItem.RowCount property is not set to 0.
The ASPxComboBox control is used when the corresponding BOModel | <Class> | OwnMembers | <Member> node's PredefinedValues property is specified. To expand the control's drop-down window, use the Alt + Down Arrow.
System.Web.UI.WebControls.Label ASPxTextBox editor from the ASPxEditors Library
or
ASPxMemo editor from the ASPxEditors Library
or
ASPxComboBox editor from the ASPxEditors Library

ASPxHtmlPropertyEditor

Intended for string properties and should be used in Detail Views only. To use it, assign it to the PropertyEditorType property of the required Views | <DetailView> | Items | <PropertyEditor> node. This Property Editor is supplied with the HTML Property Editor Module.

Using this Property Editor, you can visually format a string with HTML tags. There are three tabs. The Design tab has the instrument panel that allows you to format a string with HTML tags. The HTML tab displays plain HTML code. The Preview tab displays rendered HTML.

System.Web.UI.WebControls.Label ASPxHtmlEditor editor from the ASPxHtmlEditor library.

Expanded Examples

Expanded See Also

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