GC.Spread.Sheets.ConditionalFormatting Namespace : CustomValueType Enumeration |
Member | Description |
---|---|
empty | Indicates whether the cell value is empty or null. |
error | Indicates whether the cell value contains a calculation error. |
formula | Indicates whether the cell value is a formula. |
nonEmpty | Indicates whether the cell value is not empty or null. |
nonError | Indicates whether the cell value does not contain a calculation error. |
var nCondition = new GC.Spread.Sheets.ConditionalFormatting.Condition(GC.Spread.Sheets.ConditionalFormatting.ConditionType.formulaCondition, {customValueType: GC.Spread.Sheets.ConditionalFormatting.CustomValueType.formula, formula: "A1>0"}); var validator = new GC.Spread.Sheets.DataValidation.DefaultDataValidator(nCondition); validator.type(GC.Spread.Sheets.DataValidation.CriteriaType.custom); activeSheet.getCell(0, 0, GC.Spread.Sheets.SheetArea.viewport).validator(validator); spread.options.highlightInvalidData = true; activeSheet.setValue(0, 0, -4);
var nCondition = new GC.Spread.Sheets.ConditionalFormatting.Condition(GC.Spread.Sheets.ConditionalFormatting.ConditionType.formulaCondition, {compareType: GC.Spread.Sheets.ConditionalFormatting.CustomValueType.nonEmpty}); var validator = new GC.Spread.Sheets.DataValidation.DefaultDataValidator(nCondition); validator.ignoreBlank(false); activeSheet.getCell(0, 0, GC.Spread.Sheets.SheetArea.viewport).validator(validator); spread.options.highlightInvalidData = true;
var nCondition = new GC.Spread.Sheets.ConditionalFormatting.Condition(GC.Spread.Sheets.ConditionalFormatting.ConditionType.formulaCondition); nCondition.customValueType(GC.Spread.Sheets.ConditionalFormatting.CustomValueType.formula); nCondition.formula("A1>0"); var validator = new GC.Spread.Sheets.DataValidation.DefaultDataValidator(nCondition); validator.type(GC.Spread.Sheets.DataValidation.CriteriaType.custom); activeSheet.getCell(0, 0, GC.Spread.Sheets.SheetArea.viewport).validator(validator); spread.options.highlightInvalidData = true; activeSheet.setValue(0, 0, -4);
Object
GC.Spread.Sheets.ConditionalFormatting.CustomValueType