Kendo UI 网格内联获取 SUM 值

Kendo UI Grid Inline get SUM value

我有这个inline editing grid。我想要实现的是我在 basePaxextraBedAllow 中输入一个值,maxPax 将获得两个数据的 SUM 值。

我使用编辑事件但似乎不起作用

edit: function(e) {
  var E1 = parseInt(e.model.basePax);
  var E2 = parseInt(e.model.extraBedAllow);
  var EX = E1 + E2;
  e.model.set("maxPax", EX);
}

WORKING DEMO

尝试在编辑中使用jQuery更改功能。 喜欢this

  edit: function(e) {
      $("[name='basePax'],[name='extraBedAllow']").change(
          function(){
          var E1 = parseInt(e.model.basePax);

          var E2 = parseInt(e.model.extraBedAllow);

          var EX = E1 + E2;
          e.model.set("maxPax", EX);
        });
      }