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

MVCxGridViewEditingSettings.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.v18.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
GridViewSettings
.SettingsEditing.ShowModelErrorsForEditors
GridViewSettings<RowType>
.SettingsEditing.ShowModelErrorsForEditors
MVCxGridView
.SettingsEditing.ShowModelErrorsForEditors
MVCxGridViewProperties
.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 Grid View. This behavior is controlled by the grid’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 grid’s GridViewExtension.SetEditErrorText method to display a common error text in a special row at the bottom of the grid’s edit form.

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

See Also