Show theme settings Shopping cart Download trialFree Trial
Change Theme Settings
Change Theme Settings
Show All Themes


Set caption on the client side:
CaptionSettings.RequiredMarkDisplayMode = "Auto"
CaptionSettings.RequiredMark = "*"
CaptionSettings.Position = "Top"
ValidationSettings.RequiredField.IsRequired = "true"
ValidationSettings.Display = "Dynamic"
ValidationSettings.ErrorTextPosition = "Bottom"
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.

Local Copy of this Demo
To inspect the source code for this demo on your machine, you must first install our components via the DevExpress Component Installer.
You can open a local copy of this online demo directly from this webpage (if using v20.2.8, 21.1.4 or higher).
Open CS Solution
Open VB Solution
The source code files for this demo are installed (by default) in the following directories:
\Users\Public\Documents\DevExpress Demos XX.X\Components\ASP.NET\CS\ASPxEditorsDemos
\Users\Public\Documents\DevExpress Demos XX.X\Components\ASP.NET\VB\ASPxEditorsDemos