ComponentOne Grid for WPF: Data Validation > Validating Cell Input

Validating Cell Input

Cell input validation allows you to customize how users interact with the grid and what values the grid will accept.

With the built-in cell value validation mechanism, the grid can validate user input to the ItemCell.Value property (either declaratively or in an event handler), reflect errors reported by the data source (via exception or IDataErrorInfo interface), and visualize indicated errors in a customizable way.

The cell value validation mechanism covers both stages of the source property value update process outlined in the Inputting Data topic. If an error occurs during the update process, the ErrorInfo property of the CellErrorInfo type will have HasError property set to True and other properties will contain detailed information describing the error. A cell with an invalid input will also have a visual indication of the error – by default represented as a red rectangle around a cell and a ToolTip with the error's description.


Cell Error Visualization

Cell In Error and Focus

Improving IDataErrorInfo Performance Using the IQuickDataErrorInfo Interface


Send comments about this topic to ComponentOne.
Copyright © 1987-2010 ComponentOne LLC. All rights reserved.