SpreadJS Documentation
RelationCondition Constructor
The relation between the first and second condition.
The first condition.
The second condition.
Represents a relation condition with a specified relation type.
Syntax
var instance = new GcSpread.Sheets.RelationCondition(compareType, item1, item2);
function RelationCondition( 
   compareType : RelationCompareType,
   item1 : object,
   item2 : object
) : RelationCondition;

Parameters

compareType
The relation between the first and second condition.
item1
The first condition.
item2
The second condition.
Example
This example validates data.
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(GcSpread.Sheets.RelationCompareType.And, condition1, 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.