GridViewExtension.SetEditErrorText(String) Method

Displays the specified (error) text in a special row at the bottom of the grid’s Edit Form.

Namespace: DevExpress.Web.Mvc

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


public GridViewExtension SetEditErrorText(
    string message


Name Type Description
message String

A string value specifying the text to be displayed within the Edit Form’s bottom.


Type Description

A GridViewExtension object representing the GridView extension.


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

This method can be used together with the automatic Model error visualization feature controlled by the grid’s MVCxGridViewEditingSettings.ShowModelErrorsForEditors property.

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


When GridView functions in the batch edit mode, the SetEditErrorText method doesn’t work. To show edit errors in batch edit mode, use the MVCxBatchUpdateValues<T, S>.SetErrorText method. Refer to the Batch Editing topic to learn more.


    var grid = Html.DevExpress().GridView(settings => {
        settings.Name = "gvEditing";
        settings.KeyFieldName = "ProductID";
    if (ViewData["EditError"] != null){


Online Demos

See Also