Kendo Grid Column验证整数

时间:2018-10-03 13:33:18

标签: kendo-ui

我有一个Kendo网格,我需要用户仅在0到100之间输入整数到“建议的折扣”列(网格中仅可编辑的列)。即使用户输入正确的值,它也会显示错误消息。

fields: {
   ProposedDiscount: {
       validation: {
           required: true,
           proposeddiscountvalidation: function (input) {
               if ((input.val() >= 0 && input.val() < 101) && input.is("[name='ProposedDiscount']")) {
                   input.attr("data-proposeddiscountvalidation-msg", "Proposed Discount should be whole number");

                   return false;
               }  return true;

           }
       }
   }

我在ui上遇到错误。

enter image description here

我是Kendo UI的新手。

0 个答案:

没有答案
相关问题