SpreadJS Documentation
dataValidator Method
The cell data validator.
Gets or sets the data validator for the cell.
Syntax
var instance = new GcSpread.Sheets.Cell(sheet, row, col, sheetArea);
var returnValue; // Type: DefaultDataValidator
returnValue = instance.dataValidator(value);
function dataValidator( 
   value : DefaultDataValidator
) : DefaultDataValidator;

Parameters

value
The cell data validator.

Return Value

The cell data validator.
Example
This example creates a validator.
spread.highlightInvalidData(true);
var dv = GcSpread.Sheets.DefaultDataValidator.createDateValidator(GcSpread.Sheets.ComparisonOperator.Between, new Date(2012, 11, 31), new Date(2013, 11, 31));
dv.showInputMessage = true;
dv.inputMessage = "Enter a date between 12/31/2012 and 12/31/2013.";
dv.inputTitle = "Tip";
activeSheet.getCell(0,0).dataValidator(dv);
See Also

Reference

Cell type

 

 


Copyright © GrapeCity, inc. All rights reserved.

Send comments on this topic.