Skip to main content
A newer version of this page is available. .
Tab

ValidationSettings.Display Property

Gets or sets a value that specifies the render style of the error message displayed along the editor if its value has not passed the validation criteria specified.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v19.1.dll

Declaration

[DefaultValue(Display.Static)]
public Display Display { get; set; }

Property Value

Type Default Description
Display **Static**

One of the Display enumeration values.

Available values:

Name Description
Static

Specifies that an error frame is displayed around the validated editor, preserving its position. An empty space for the error message is initially rendered near the editor.

Display_Static.png

Dynamic

Specifies that an error frame is displayed at the validated editor’s position, shifting the editor itself. The error message is rendered dynamically at the moment the editor fails validation.

Display_Dynamic.png

None

No error message is displayed.

Property Paths

You can access this nested property as listed below:

Show 156 property paths
Library Object Type Path to Display
ASP.NET Controls and MVC Extensions ASPxAutoCompleteBoxBase
ASPxBinaryImage
ASPxButtonEdit
ASPxButtonEditBase
ASPxCalendar
ASPxCheckBox
ASPxCheckBoxList
ASPxCheckListBase
ASPxColorEdit
ASPxComboBox
ASPxDateEdit
ASPxDropDownEdit
ASPxDropDownEditBase
ASPxEdit
ASPxGridLookup
HERibbonCustomCssListBoxProperties
ToolbarComboBoxProperties
ToolbarCustomComboBoxProperties
ASPxListBox
ASPxListEdit
ASPxMemo
ASPxPureTextBoxBase
ASPxRadioButton
ASPxRadioButtonList
DateNavigatorProperties
ASPxSpinEdit
ASPxSpinEditBase
ASPxTextBox
ASPxTextBoxBase
ASPxTextEdit
ASPxTimeEdit
ASPxTokenBox
ASPxTrackBar
AutoCompleteBoxPropertiesBase
BinaryImageEditProperties
ButtonEditProperties
ButtonEditPropertiesBase
CalendarProperties
CheckBoxListProperties
CheckBoxProperties
CheckListPropertiesBase
ColorEditProperties
ComboBoxProperties
DateEditCalendarProperties
DateEditProperties
DateEditTimeEditProperties
DropDownEditProperties
DropDownEditPropertiesBase
EditProperties
GridLookupProperties
ListBoxProperties
ListEditProperties
MemoProperties
MVCxBinaryImage
MVCxButtonEdit
MVCxButtonEditProperties
MVCxCalendar
MVCxCalendarProperties
MVCxCheckBox
MVCxCheckBoxList
MVCxCheckBoxListProperties
MVCxCheckBoxProperties
MVCxColorEdit
MVCxColorEditProperties
MVCxColumnButtonEditProperties
MVCxColumnCheckBoxProperties
MVCxColumnColorEditProperties
MVCxColumnComboBoxProperties
MVCxColumnDateEditProperties
MVCxColumnDropDownEditProperties
MVCxColumnMemoProperties
MVCxColumnSpinEditProperties
MVCxColumnTextBoxProperties
MVCxColumnTimeEditProperties
MVCxColumnTokenBoxProperties
MVCxComboBox
MVCxComboBoxProperties
MVCxDateEdit
MVCxDateEditProperties
MVCxDropDownEdit
MVCxDropDownEditProperties
MVCxGridLookup
MVCxGridLookupProperties
MVCxListBox
MVCxListBoxProperties
MVCxMemo
MVCxMemoProperties
MVCxRadioButton
MVCxRadioButtonList
MVCxRadioButtonListProperties
MVCxRadioButtonProperties
MVCxRibbonComboBoxProperties
MVCxSpinEdit
MVCxSpinEditProperties
MVCxTextBox
MVCxTextBoxProperties
MVCxTimeEdit
MVCxTimeEditProperties
MVCxTokenBox
MVCxTokenBoxProperties
MVCxTrackBar
MVCxTrackBarProperties
MVCxValidationEdit
MVCxValidationEditProperties
RadioButtonListProperties
RadioButtonProperties
RibbonCheckBoxProperties
RibbonComboBoxProperties
RibbonDateEditProperties
RibbonSpinEditProperties
RibbonTextBoxProperties
SpinEditProperties
SpinEditPropertiesBase
TextBoxProperties
TextBoxPropertiesBase
TextEditProperties
TimeEditProperties
TokenBoxProperties
TrackBarProperties
ASP.NET Bootstrap Controls BootstrapBinaryImage
BootstrapBinaryImageEditProperties
BootstrapButtonEdit
BootstrapButtonEditProperties
BootstrapCalendar
BootstrapCalendarProperties
BootstrapCheckBox
BootstrapCheckBoxList
BootstrapCheckBoxListProperties
BootstrapCheckBoxProperties
BootstrapColorEdit
BootstrapColorEditProperties
BootstrapComboBox
BootstrapComboBoxProperties
BootstrapDateEdit
BootstrapDateEditCalendarProperties
BootstrapDateEditProperties
BootstrapDateEditTimeEditProperties
BootstrapDropDownEdit
BootstrapDropDownEditProperties
BootstrapListBox
BootstrapListBoxProperties
BootstrapMemo
BootstrapMemoProperties
BootstrapRadioButton
BootstrapRadioButtonList
BootstrapRadioButtonListProperties
BootstrapRadioButtonProperties
BootstrapSchedulerDateNavigatorProperties
BootstrapSpinEdit
BootstrapSpinEditProperties
BootstrapTagBox
BootstrapTagBoxProperties
BootstrapTextBox
BootstrapTextBoxProperties
BootstrapTimeEdit
BootstrapTimeEditProperties

Remarks

Use the Display property to control the manner in which the error message is displayed along the editor. Settings this property value to None hides the error message. The other values of this property affect the layout differently, depending on the ValidationSettings.ErrorDisplayMode property value.

  • If the ValidationSettings.ErrorDisplayMode is set to None (the error frame mode), the Display property controls the way in which the error frame is displayed around the editor.

    • In Dynamic mode, the frame is displayed at the editor’s position, shifting the editor itself.
    • In Static mode, the error frame is displayed around the editor, preserving its position.
  • In all other cases (when the ValidationSettings.ErrorDisplayMode property is set to ImageWithText, ImageWithTooltip or Text), the Display property value doesn’t affect the actual layout. The only difference is that in Static mode, a space for the error message is initially rendered along with the editor, while in Dynamic mode it is generated dynamically when necessary.

Note

When a grid-based control is in Batch Edit mode, set the Display property to Dynamic, so as not to render the empty space (the validation error element) near the edit cell.

Web Forms:

...
<dx:GridViewDataSpinEditColumn FieldName="UnitPrice">
    <PropertiesSpinEdit DisplayFormatString="c" DisplayFormatInEditMode="true" MinValue="0" MaxValue="60000">
        <ValidationSettings Display="Dynamic" RequiredField-IsRequired="true" />
    </PropertiesSpinEdit>
</dx:GridViewDataSpinEditColumn>
...

MVC:

settings.CellEditorInitialize = (s, e) => {
    ASPxEdit editor = (ASPxEdit)e.Editor;
    editor.ValidationSettings.Display = Display.Dynamic;
};

The following code snippets (auto-collected from DevExpress Examples) contain references to the Display property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also