SpreadJS Documentation
setDataValidator Method
The row index.
The column index.
The data validator.
The sheet area. If this parameter is not provided, it defaults to viewport.
Sets the cell data validator.
Syntax
var instance = new GcSpread.Sheets.Sheet(name);
var returnValue; // Type: any
returnValue = instance.setDataValidator(row, col, value, sheetArea);
function setDataValidator( 
   row : number,
   col : number,
   value : DefaultDataValidator,
   sheetArea : SheetArea
) : any;

Parameters

row
The row index.
col
The column index.
value
The data validator.
sheetArea
The sheet area. If this parameter is not provided, it defaults to viewport.
Example
spread.highlightInvalidData(true);
var dv = GcSpread.Sheets.DefaultDataValidator.createListValidator("1,2,3");
dv.showInputMessage = true;
dv.inputMessage = "Value must be 1, 2 or 3.";
dv.inputTitle = "tip";
activeSheet.setDataValidator(1, 1, dv); 
var validList = activeSheet.getDataValidator(1, 1).getValidList(sheet, 1, 1);
See Also

Reference

Sheet type

 

 


Copyright © GrapeCity, inc. All rights reserved.

Send comments on this topic.