# Displaying Error Icons in Cells or Rows

Learn how to display error icons in cells or rows and use the ShowCellErrors or ShowRowErrors property to specify their appearance.

## Content

You can display error icons in cells or rows.
Use the [ShowCellErrors](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.FpSpread.ShowCellErrors.html) or [ShowRowErrors](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.FpSpread.ShowRowErrors.html) property to specify whether you wish to display an error icon or a cell note indicator. Set the [ErrorText](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.Cell.ErrorText.html) property for the [Cell](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.Cell.html) class or [Row](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.Row.html) class to specify the cell or row to display the error icon in. Set the value of the **ErrorText** property to "CellError" to display the error icon for a cell or "RowError" to specify the error icon for a row. The following image displays the error icon.
![Spreadsheet with an error icon](https://cdn.mescius.io/document-site-files/images/2238e618-a1fb-45a6-9ce5-9a4157bd2931/images/erroricon.png)
You can display a cell note indicator instead of the error icon by setting **ShowCellErrors** or **ShowRowErrors** to false. The text you specify with the **ErrorText** property is then displayed in the cell note.

## Using Code

1. Set the [ShowCellErrors](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.FpSpread.ShowCellErrors.html) or [ShowRowErrors](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.FpSpread.ShowRowErrors.html) property.
2. Set the [ErrorText](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.Cell.ErrorText.html) property for the [Cell](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.Cell.html) or [Row](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.Row.html) object.

## Example

This example displays an error icon in the locked cell.

```csharp
fpSpread1.ShowCellErrors = true;
fpSpread1.Sheets[0].Cells[1, 1].ErrorText = "CellError";
fpSpread1.Sheets[0].Cells[1, 1].Locked = true;

;
```

```vbnet
fpSpread1.ShowCellErrors = True
fpSpread1.Sheets(0).Cells(1, 1).ErrorText = "CellError"
fpSpread1.Sheets(0).Cells(1, 1).Locked = True
```

## See Also

[Using Validation in Cells](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-interactcell/spwin-cellvalid/spwin-cellvalidation)
[Validating User Input](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-interactcell/spwin-cellvalid/spwin-datavalidate)
[Customizing the User Error Messages](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-interactcell/spwin-cellvalid/spwin-cntrlmessages)