SpreadJS Documentation
TextLengthCondition Constructor
The number comparison type.
The expected number.
The expected formula.
Represents a text length condition with the specified comparison type, expected number, and formula.
Syntax
var instance = new GcSpread.Sheets.TextLengthCondition(compareType, expected, formula);
function TextLengthCondition( 
   compareType : GeneralCompareType,
   expected : object,
   formula : string
) : TextLengthCondition;

Parameters

compareType
The number comparison type.
expected
The expected number.
formula
The expected formula.
Example
This example validates the cell data.
var textLengthCondition = new GcSpread.Sheets.TextLengthCondition(GcSpread.Sheets.GeneralCompareType.GreaterThan, 5);
var validator = new GcSpread.Sheets.DefaultDataValidator(textLengthCondition)
activeSheet.getCell(0, 0, GcSpread.Sheets.SheetArea.viewport).dataValidator(validator);
spread.highlightInvalidData(true);
activeSheet.setValue(0, 0, "abcf");
See Also

Reference

TextLengthCondition type

 

 


Copyright © GrapeCity, inc. All rights reserved.

Send comments on this topic.