Skip to main content

VGridControlBase.SetRowError(RowProperties, String) Method

For the VGridControl, this method sets or clears an error for the specified cell within the focused record. For the PropertyGridControl, this method sets or clears an error for the specified row.

Namespace: DevExpress.XtraVerticalGrid

Assembly: DevExpress.XtraVerticalGrid.v24.1.dll

NuGet Packages: DevExpress.Win.Navigation, DevExpress.Win.VerticalGrid

Declaration

public virtual void SetRowError(
    RowProperties props,
    string errorText
)

Parameters

Name Type Description
props RowProperties

A RowProperties object that identifies the target cell.

errorText String

The error description. An empty string to clear the previously assigned error.

Remarks

Use the SetRowError method to assign errors to records or individual cells. This can be useful if you handle the VGridControlBase.ValidateRecord event to perform input validation and want to indicate input errors within cells.

The control shows an error icon when you assign an error to a cell. A user can hover over the icon to see a hint that displays the error description.

Set the errorText parameter to an empty string to clear the previously assigned error.

A call to the SetRowError method has no effect if no record is currently focused (the vertical grid’s VGridControlBase.FocusedRecord property’s value is -1).

See the following topic for information on how to handle errors at the data source level: Error Notification Support for Data Sources. The technique described in this topic allows you to set errors for any record, not only for the focused record.

See Also