|| | |||Browse by category|
How can I validate cell contents before they are stored in the grid?
You should either override OnValidateCell() or OnEndEditing().
OnValidateCell() is called only if the cell is marked modified. If you return FALSE the cell contents will not be stored in the grid and the user cannot navigate the current cell to a new position.
OnEndEditing() is called regardless whether a cell is marked modified or not. If you return FALSE the user cannot navigate the current cell to a new position.
Note that check boxes and radio buttons have no modified state. When the user clicks into a checkbox, the new value is stored immediately in the grid. Therefore OnValidateCell() will not be called. You should implement validation for check boxes in OnClickedButtonRowCol().