Data Editors - Common Features Caption

settings.Properties.Caption = "Text Box"
settings.Properties.Caption = "Combo Box"
settings.Properties.CaptionSettings.RequiredMarkDisplayMode = EditorRequiredMarkMode.Auto (default value)
settings.Properties.CaptionSettings.RequiredMark = "*" (default value)
settings.Properties.CaptionSettings.Position = EditorCaptionPosition.Top
settings.Properties.ValidationSettings.RequiredField.IsRequired = true
settings.Properties.Caption = "Memo"
settings.Properties.CaptionSettings.Position = EditorCaptionPosition.Top
settings.Properties.CaptionSettings.RequiredMarkDisplayMode = EditorRequiredMarkMode.Optional
settings.Properties.CaptionSettings.OptionalMark = " (optional)"
settings.Properties.Caption = "Radio Button List"
settings.Properties.CaptionSettings.VerticalAlign = EditorCaptionVerticalAlign.Middle

DevExpress Data Editors allow you to specify an editor's caption, which can be positioned and aligned relative to an editor. To customize the caption settings, you can use the following properties.

  • Caption – specifies the caption text.
  • Position – specifies the position of a caption related to the editor.
  • HorizontalAlign, VerticalAlign – specify the horizontal and vertical alignment of a caption.
  • ShowColon – specifies whether the colon sign is displayed after caption text.
  • RequiredMark – specifies the text displayed after a caption when the editor value is required.
  • OptionalMark – specifies the text displayed after a caption when the editor value is optional.
  • RequiredMarkDisplayMode – specifies which mark should be displayed after a caption. This property can be set to the following values.
    • Optional. The optional mark is displayed after a caption.
    • Required. The Required mark is displayed after a caption.
    • Hidden. Neither the optional mark nor the required mark is displayed after a caption.
    • Auto. If the IsRequired property is set to true, the required mark is displayed after a caption.

This demo illustrates how a DevExpress Data Editor’s caption can be customized for editors of different types.

Version: v2017 vol 1.7
Copyright © 2006-2017 Developer Express Inc
Your Next Great MVC App Starts Here

Get started today and download your 30-day trial of DevExpress MVC Extensions (includes 30 days of free technical support).

All demos ship with full source code and are included in the DevExpress MVC distribution. Refer to the Demos and Sample Applications topic to learn more.

DevExpress MVC Extensions ship as part of DevExpress Universal, DXperience and ASP.NET Subscriptions and are backed by a 60 day unconditional money-back guarantee.
To learn more and obtain pricing information, visit the Compare Features and Pricing webpage. For immediate assistance, contact us by Email at or by phone at +1 (818) 844-3383 between 7:30am and 4:30pm Pacific Time.