EasyUI Forum
September 14, 2025, 12:00:31 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: show result of a sum on a datagrid  (Read 5863 times)
pedroc
Newbie
*
Posts: 17


View Profile
« 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);
                    }
                })                
            }
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!