SpreadJS 14
GC.Spread.Sheets.ConditionalFormatting Namespace / TextCompareType Enumeration
In This Topic
    TextCompareType Enumeration
    In This Topic
    Specifies the text compare type.
    beginsWithIndicates whether the string starts with a specified string.
    containsIndicates whether the string contains a specified string.
    doesNotBeginWithIndicates whether the string does not start with a specified string.
    doesNotContainIndicates whether the string does not contain a specified string.
    doesNotEndWithIndicates whether the string does not end with a specified string.
    endsWithIndicates whether the string ends with a specified string.
    equalsToIndicates whether the string is equal to a specified string.
    notEqualsToIndicates whether the string is not equal to a specified string.
    This example uses the TextCompareType enumeration.
    var nCondition = new GC.Spread.Sheets.ConditionalFormatting.Condition(GC.Spread.Sheets.ConditionalFormatting.ConditionType.textCondition, {compareType: GC.Spread.Sheets.ConditionalFormatting.TextCompareType.contains, expected: "test"});
    var validator = new GC.Spread.Sheets.DataValidation.DefaultDataValidator(nCondition);
    activeSheet.getCell(0, 0, GC.Spread.Sheets.SheetArea.viewport).validator(validator);
    spread.options.highlightInvalidData = true;
    activeSheet.setValue(0, 0, "testing");
    //Type text in 0,0 that does not contain "test" to see invalid symbol
    Inheritance Hierarchy


    See Also