Spread.Sheets Documentation
createNumberValidator Method
The type of ComparisonOperators compare operator.
The first object.
The second object.
Set to true if the validator is set to a number.
Creates a validator based on numbers.
Syntax
var value; // Type: DefaultDataValidator
value = GC.Spread.Sheets.DataValidation.createNumberValidator(typeOperator, v1, v2, isIntegerValue);
function createNumberValidator( 
   typeOperator : ComparisonOperators,
   v1 : object,
   v2 : object,
   isIntegerValue : boolean
) : DefaultDataValidator;

Parameters

typeOperator
The type of ComparisonOperators compare operator.
v1
The first object.
v2
The second object.
isIntegerValue
Set to true if the validator is set to a number.

Return Value

The validator.
Example
This example creates a number validator.
spread.options.highlightInvalidData = true;
var dv = GC.Spread.Sheets.DataValidation.createNumberValidator(GC.Spread.Sheets.ConditionalFormatting.ComparisonOperators.between, "5", "20", true);
dv.showInputMessage(true);
dv.inputMessage("Value must be between 5 and 20.");
dv.inputTitle("tip");
activeSheet.setDataValidator(1, 1, dv);
See Also

Reference

DataValidation type

 

 


Copyright © GrapeCity, inc. All rights reserved.

Send comments on this topic.