SpreadJS Documentation
compareType Field
Gets the relation type for the first and second conditions.
Syntax
var instance = new GcSpread.Sheets.RelationCondition(compareType, item1, item2);
var value; // Type: RelationCompareType
value = instance.compareType;
var compareType : RelationCompareType;
Example
This example validates a date.
var condition1 = new GcSpread.Sheets.DateCondition(GcSpread.Sheets.DateCompareType.AfterEqualsTo, new Date(2012, 11, 31));
var condition2 = new GcSpread.Sheets.DateCondition(GcSpread.Sheets.DateCompareType.BeforeEqualsTo, new Date(2013, 11, 31));
var nCondition = new GcSpread.Sheets.RelationCondition();
nCondition.compareType = GcSpread.Sheets.RelationCompareType.And;
nCondition.item1 = condition1;
nCondition.item2 = condition2;
var validator = new GcSpread.Sheets.DefaultDataValidator(nCondition);
activeSheet.getCell(0, 0, GcSpread.Sheets.SheetArea.viewport).dataValidator(validator);
spread.highlightInvalidData(true);
activeSheet.setValue(0, 0, new Date(2012, 11, 25));
See Also

Reference

RelationCondition type

 

 


Copyright © GrapeCity, inc. All rights reserved.

Send comments on this topic.