Skip to main content
A newer version of this page is available. .
.NET Framework 4.5.2+

String Properties

  • 4 minutes to read

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

  • String properties with a fixed length (for example, 100 or 15 characters) are displayed in a text editor.
  • Large string properties are displayed in a memo editor. These properties are not displayed in List Views by default.
  • String properties with a StringCompressionConverter Value Converter assigned are stored in the database in a compressed form (for XPO in WinForms and ASP.NET Web Forms applications only).
  • You can use the Delayed Loading feature to improve performance when handling unlimited size properties (for XPO only).
  • If predefined values are specified in the Application Model (see IModelCommonMemberViewItem.PredefinedValues), string properties are displayed in a combo box editor (for WinForms and ASP.NET Web Forms applications only).
  • In WinForms and ASP.NET Web Forms applications, string properties with HTML-formatted text values can be displayed in Rich Text Editor.

Note

Refer to the Property Editors | String Properties section in the Feature Center demo installed with XAF to see String Property Editors in action. The Feature Center demo is installed in %PUBLIC%\Documents\DevExpress Demos 22.1\Components\XAF\FeatureCenter.NETFramework.XPO. The ASP.NET Web Forms version of this demo is available online at https://demos.devexpress.com/XAF/FeatureCenter/.

Examples

WinForms

Each WinForms Property Editor comes with a control that displays a corresponding property in a Detail View and a repository item that displays this property in a List Editor that supports in-place editing.

StringPropertyEditor

XAF StringPropertyEditor WinForms

Controls:

  • StringEdit - a descendant of the XtraEditors Library’s TextEdit editor;
  • PredefinedValuesStringEdit - a descendant of the XtraEditors Library’s ComboBoxEdit editor;
  • LargeStringEdit - a descendant of the XtraEditors Library’s MemoEdit editor.

Repository Items:

Description:

Used for string properties by default.

The StringEdit control and the RepositoryItemStringEdit item are used when the corresponding BOModel | <Class> | OwnMembers | <Member> node’s RowCount property is set to 0 (the property’s default value) or 1.

The PredefinedValuesStringEdit control and RepositoryItemPredefinedValuesStringEdit items are used when the corresponding BOModel | <Class> | OwnMembers | <Member> node’s RowCount property is set to 0 or 1, and the PredefinedValues property is specified. Use Alt + Down Arrow to expand the control’s drop-down window.

The LargeStringEdit control and RepositoryItemMemoExEdit repository items are used when the corresponding BOModel | <Class> | OwnMembers | <Member> node’s RowCount property is greater than 1. Note that this property affects only the minimum height of the LargeStringEdit control. The actual height is determined by the available space.

You can specify a mask for StringPropertyEditor. See the following topics for more information:

Note

The StringEdit control and the RepositoryItemStringEdit item can be used to display a non-string property. For this purpose, 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 is displayed in the StringEdit control.

RichTextPropertyEditor

XAF RichEdit WinForms

Control: RichEditorContainer - a wrapper for the XtraEditors Library’s RichEditControl.

Repository Item: XtraEditors Library’s RepositoryItemRichTextEdit item.

Description:

Intended for string properties and can be used in List and Detail Views. This Property Editor is supplied with the Office Module. This Property Editor allows you to edit rich text documents stored in the RTF or HTML format and create Mail Merge templates. Refer to the Use Rich Text Documents in Business Objects topic for more information about the RichTextPropertyEditor.

ASP.NET Web Forms

Each ASP.NET Web Forms Property Editor includes controls that display a property in a Detail View in View and Edit mode.

ASPxStringPropertyEditor

XAF ASPxStringPropertyEditor Web Forms

View mode control: System.Web.UI.WebControls.Label.

Edit mode controls:

Description:

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) or 1.

The ASPxMemo control is used when the corresponding BOModel | <Class> | OwnMembers | <Member> node’s IModelCommonMemberViewItem.RowCount property is greater than 1.

The ASPxComboBox control is used when the corresponding BOModel | <Class> | OwnMembers | <Member> node’s PredefinedValues property is specified. Use the Alt + Down Arrow to expand the control’s drop-down window.

ASPxRichTextPropertyEditor

 XAF ASPxRichTextPropertyEditor

View and Edit mode control: ASPxRichEdit editor from the ASPxEditors Library.

Description:

Intended for string properties and can be used in List and Detail Views. This Property Editor is supplied with the Office Module. This Property Editor allows you to edit rich text documents stored in the RTF or HTML format and create Mail Merge templates. Refer to the Use Rich Text Documents in Business Objects topic for more information about the ASPxRichTextPropertyEditor.

See Also