You can display error icons in cells or rows.
Use the ShowCellErrors or ShowRowErrors property to specify whether you wish to display an error icon or a cell note indicator. Set the ErrorText property for the Cell class or Row 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.
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
- Set the ShowCellErrors or ShowRowErrors property.
- Set the ErrorText property for the Cell or Row object.
Example
This example displays an error icon in the locked cell.
CS | ![]() |
---|---|
fpSpread1.ShowCellErrors = true; fpSpread1.Sheets[0].Cells[1, 1].ErrorText = "CellError"; fpSpread1.Sheets[0].Cells[1, 1].Locked = true; |
VB | ![]() |
---|---|
FpSpread1.ShowCellErrors = True FpSpread1.Sheets(0).Cells(1, 1).ErrorText = "CellError" FpSpread1.Sheets(0).Cells(1, 1).Locked = True |