Spread.Sheets Documentation
createNumberValidator Method
GC.Spread.Sheets Namespace > DataValidation type : 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, 1, 1, dv, GC.Spread.Sheets.SheetArea.viewport);
See Also

Reference

DataValidation type