SpreadJS Documentation
validator Field
Indicates the data validator.
Syntax
var instance = new GcSpread.Sheets.Style(backColor,
                                        foreColor,
                                        hAlign,
                                        vAlign,
                                        font,
                                        themeFont,
                                        formatter,
                                        borderLeft,
                                        borderTop,
                                        borderRight,
                                        borderBottom,
                                        locked,
                                        textIndent,
                                        wordWrap,
                                        shrinkToFit,
                                        backgroundImage,
                                        cellType,
                                        backgroundImageLayout,
                                        tabStop,
                                        textDecoration,
                                        imeMode,
                                        name,
                                        parentName,
                                        watermark);
var value; // Type: DefaultDataValidator
value = instance.validator;
var validator : DefaultDataValidator;
Example
This example uses the validator property.
spread.highlightInvalidData(true);
var dv = GcSpread.Sheets.DefaultDataValidator.createDateValidator(GcSpread.Sheets.ComparisonOperator.Between, new Date(2012, 11, 31), new Date(2013, 11, 31));
dv.showInputMessage = true;
dv.inputMessage = "Enter a date between 12/31/2012 and 12/31/2013.";
dv.inputTitle = "Tip";
var style = new GcSpread.Sheets.Style();
style.validator = dv;
activeSheet.setStyle(1,1,style,GcSpread.Sheets.SheetArea.viewport);
See Also

Reference

Style class

 

 


Copyright © GrapeCity, inc. All rights reserved.

Send comments on this topic.