Change Theme Settings
Change Theme Settings
Themes
 
Show All Themes
v
...v

Caption

Set caption on the client side:
*
v
CaptionSettings.RequiredMarkDisplayMode = "Auto"
CaptionSettings.RequiredMark = "*"
CaptionSettings.Position = "Top"
ValidationSettings.RequiredField.IsRequired = "true"
ValidationSettings.Display = "Dynamic"
ValidationSettings.ErrorTextPosition = "Bottom"
(optional)
CaptionSettings.Position = "Top"
CaptionSettings.RequiredMarkDisplayMode = "Optional"
CaptionSettings.OptionalMark = " (optional)"
CaptionSettings.VerticalAlign = "Middle"

DevExpress 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. You can change the caption on the client side using the SetCaption method.
  • 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 editor’s caption can be customized for editors of different types.