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");
});
以上代码只能对一个单元格做数据验证,有没有能对一个区域的数据做数据校验的方法 |
|