回复 3楼luozhu1986的帖子
很抱歉回复晚了。
使用Validation来做验证,专门写了代码来实现你的需求,如下:
- var dataValidator = new $.wijmo.wijspread.DefaultDataValidator.createNumberValidator($.wijmo.wijspread.ComparisonOperator.Between, 1, 100, true);
- sheet.setDataValidator(1, 1, dataValidator);
- sheet.bind($.wijmo.wijspread.Events.ValidationError, function (data, args) {
- args.validationResult = $.wijmo.wijspread.DataValidationResult.Discard;
- alert("Input number must between 1 to 100");
- });
复制代码 |