有时候在行编辑的时候,一个编辑框的值要根据其它编辑框的值进行变化,那么可以通过在开启编辑时,找到特定的Editor,为其添加事件

function editrow(index) {    

if (rowedit == 0) {        

$('#ZCEditList').datagrid('beginEdit', index);        

rowedit = 1;

        var editors = $('#ZCEditList').datagrid('getEditors', index);            

  var TonsEditor = editors[3];        

var HorsepowerEditor = editors[4];           

var StandardEditor = editors[10];         

TonsEditor.target.bind('blur', function () {            

HorsepowerEditor.target.val('');            

var sum = TonsEditor.target.val() * 10;                    

  StandardEditor.target.val(sum);

        });        

    } }

相关文章:

  • 2021-07-14
  • 2022-01-16
  • 2022-01-10
  • 2021-12-01
  • 2021-05-20
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-07-20
  • 2022-12-23
  • 2021-05-26
  • 2022-12-23
  • 2021-10-25
相关资源
相似解决方案