Skip to main content

MVCxCardViewEditingSettings.ShowModelErrorsForEditors Property

Gets or sets a value that specifies whether or not model error messages should be automatically displayed for invalid editors within the Edit Form.

Namespace: DevExpress.Web.Mvc

Assembly: DevExpress.Web.Mvc5.v24.2.dll

Declaration

public bool ShowModelErrorsForEditors { get; set; }

Property Value

Type Description
Boolean

true if model error messages are automatically displayed for invalid editors; false if the automatic error visualization feature is not used.

Property Paths

You can access this nested property as listed below:

Object Type Path to ShowModelErrorsForEditors
CardViewSettings
.SettingsEditing .ShowModelErrorsForEditors
MVCxCardView
.SettingsEditing .ShowModelErrorsForEditors

Remarks

By default, if the data entered and submitted by an end-user is invalid due to the Model validation rules, error texts are automatically displayed next to corresponding data field editors within the CardView. This behavior is controlled by the extension’s ShowModelErrorsForEditors property. This property affects the setting of the ShowModelErrors property available for DevExpress MVC editors (e.g., TextBoxSettings.ShowModelErrors for TextBox).

In addition, if Model data is invalid or an error occurs during data changes, you can use the CardView’s CardViewExtension.SetEditErrorText method to display a common error text in a special row at the bottom of the CardView’s edit form.

To learn more, see our online demo: Card View - Edit Modes

See Also