SpreadJS Documentation
TextCondition Constructor
The type of comparison.
The expected text.
The expected formula.
Represents a text condition with the specified text comparison type based on the specified cell.
Syntax
var instance = new GcSpread.Sheets.TextCondition(compareType, expected, formula);
function TextCondition( 
   compareType : TextCompareType,
   expected : string,
   formula : string
) : TextCondition;

Parameters

compareType
The type of comparison.
expected
The expected text.
formula
The expected formula.
Example
This example validates data.
var nCondition = new GcSpread.Sheets.TextCondition(GcSpread.Sheets.TextCompareType.Contains, "test");
var validator = new GcSpread.Sheets.DefaultDataValidator(nCondition)
activeSheet.getCell(0, 0, GcSpread.Sheets.SheetArea.viewport).dataValidator(validator);
spread.highlightInvalidData(true);
activeSheet.setValue(0, 0, "testing");
//Type text in 0,0 that does not contain "test" to see invalid symbol
See Also

Reference

TextCondition type

 

 


Copyright © GrapeCity, inc. All rights reserved.

Send comments on this topic.