Spread Windows Forms 8.0 Product Documentation > Developer's Guide > Customizing Interaction in Cells > Using Visible Indicators in the Cell > Displaying Error Icons in Cells or Rows |
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.
This example displays an error icon in the locked cell.
CS |
Copy Code
|
---|---|
fpSpread1.ShowCellErrors = true; fpSpread1.Sheets[0].Cells[1, 1].ErrorText = "CellError"; fpSpread1.Sheets[0].Cells[1, 1].Locked = true; |
VB |
Copy Code
|
---|---|
FpSpread1.ShowCellErrors = True FpSpread1.Sheets(0).Cells(1, 1).ErrorText = "CellError" FpSpread1.Sheets(0).Cells(1, 1).Locked = True |