Spread.Sheets Documentation
DataValidationResult Enumeration
Indicates the data validation result.
Members
MemberDescription
discardIndicates to discard the value and not apply it to the cell for a validation error.
forceApplyIndicates to apply the value to a cell for a validation error.
retryIndicates to retry multiple times to apply the value to the cell for a validation error.
Example
This example shows an error message.
spread.options.highlightInvalidData = true;
//The formula validator is valid if the formula condition returns true.
var dv = GC.Spread.Sheets.DataValidation.createFormulaValidator("A1>0");
dv.showInputMessage(true);
dv.inputMessage("Enter a value greater than 0 in A1.");
dv.inputTitle("Tip");
dv.showErrorMessage(true);
dv.errorMessage("Incorrect Value");
activeSheet.setDataValidator(0, 0, dv);

activeSheet.bind(GC.Spread.Sheets.Events.ValidationError, function (sender, args) {
    if(args.validator.showErrorMessage()){
        if (confirm(args.validator.errorMessage())) {
            args.validationResult = GC.Spread.Sheets.DataValidation.DataValidationResult.retry; 
        } else {
            args.validationResult = GC.Spread.Sheets.DataValidation.DataValidationResult.forceApply;
        }
    }    
});
Inheritance Hierarchy

Object
   GC.Spread.Sheets.DataValidation.DataValidationResult

See Also

Reference

GC.Spread.Sheets.DataValidation Namespace

 

 


Copyright © GrapeCity, inc. All rights reserved.

Send comments on this topic.