EasyUI Forum
September 14, 2025, 04:41:22 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: many numberbox same reaction? (PLEASE)  (Read 5902 times)
pedroc
Newbie
*
Posts: 17


View Profile
« on: April 01, 2015, 08:14:29 AM »

want every change go adding and do not know how to react to the event
onBeginEdit:function(rowIndex){
                var editors = $('#dg').datagrid('getEditors', rowIndex);
                var n = [];
                for (var i = 0; i < 28; i++) {
                    n = $(editors.target);
                }
                n[2].....................................n[20]).numberbox({               //not like telling here that for each of the N elements do what you want
                    onChange:function(){
                        var tt = 0;
                        for (var i = 2; i < 28; i++) {
                            tt += parseFloat(n.numberbox('getValue'));
                        }
                        n[1].numberbox('setValue',tt);
                    }
                })
            }
« Last Edit: April 02, 2015, 06:34:31 AM by pedroc » 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!