DataGrid单元自动互动更新

onBeginEdit : function(rowIndex, rowData){
                    var row = $("#mmMiomdg").datagrid("getSelected");
                     var editors = $('#mmMiomdg').datagrid('getEditors', rowIndex);
                     var lendEditor = editors[4];
                     var loadEditor = editors[1];
                     //target属性就用于返回最初触发事件的DOM元素
                     lendEditor.target.numberbox({
                       onChange:function(newValue,oldValue){
                          if(newValue > 0){
                              loadEditor.target.numberbox('setValue', row.t10*row.t11*newValue);
                           }
                        }
                     });
                      
                     loadEditor.target.numberbox({
                     onChange:function(newValue,oldValue){
                       if(newValue > 0){
                           lendEditor.target.numberbox('setValue', 77);
                         }
                       }
                     }); 
                 }

猜你喜欢

转载自blog.csdn.net/klasoft/article/details/114187580