|
Title: show result of a sum on a datagrid Post by: pedroc on April 02, 2015, 07:42:04 AM I need to add multiple cells (editable) of a datagrid and display it in a cell result (not editable) and not as referring to the result cell to assign the sum
onBeginEdit:function(rowIndex){ var editors = $('#dg').datagrid('getEditors', rowIndex); var n = []; for (var i = 0; i < 26; i++) { n = $(editors.target); } n[0].add(n[1]).numberbox({ onChange:function(){ var tt = 0; for (var i = 0; i < 26; i++) { tt += parseFloat(n.numberbox('getValue')); } here you go what is not.numberbox('setValue',tt); } }) } |