pbValidateOnNext - cCJGrid
Determines if cell validation should occur during Next navigation
Type: Property
Access: Read/Write
Data Type: Boolean
Parameters: None
Syntax
Property Boolean pbValidateOnNext
| Access Type | Syntax |
|---|---|
| Read Access: | Get pbValidateOnNext to BooleanVariable |
| Write Access: | Set pbValidateOnNext to BooleanVariable/Value |
Description
Before a row can be saved, each column will be validated. If any column fails validation, the save will be cancelled. Validation can also occur during Next navigation. Next navigation is forward keyboard navigation that usually occurs when the user presses the Tab key. The pbValidateOnNext property determines if validation should be applied during Next navigation. The default is true. If navigation fails, the Next navigation is cancelled and the cell focus is not changed.
Next navigation is provided to assist the user. As the user tries to move to the next column, the existing column is validated, an error is reported and the user can immediately correct the error.
Validation is never applied to previous navigation because it usually makes no sense (the user may be going backwards to correct an error). Validation is never applied to mouse navigation because you don't really know what the user is trying to do. However, if mouse navigation occurs between rows, a save will be attempted and all items in the current row will be validated prior to the save.
It is always a challenge to apply navigation validation in an event driven system. Experience has shown that validation feels right on forward keyboard validation and it feels wrong with all other types of keyboard and mouse navigation.
Because grid columns can be re-ordered and hidden, even forward navigation may not feel right. If you choose to allow column reordering and hiding (and you can choose not to) you no longer have control over the order of forward navigation. If forward validation gets in the way, you can set pbValidateOnNext to false.