2017-08-17 78 views
0

我使用Ext JS的V6.2電網,在我的申請,我有三列費,費率&金額在這裏,我想第三列的所有值[金額] &概括up.please糾正我的代碼,如果我錯了,我已經搜索了文檔和其他東西,它沒有幫助。請解決問題。提前致謝。Ext Js Grid,如何獲得特定列的所有行值和總和?

      editor: { 
            xtype: 'textfield', 
            enableKeyEvents: true, 
            fieldCls: 'right-align', 

         listeners: { 
            element: 'el', 
         keyup: function(form, e, selModel, record, index, options){ 

          var InputValue= document.getElementById(e.id).value; 
          var result = (productValue) * (InputValue)/100; 
          var selectedRecord = gridStore.getSelection()[0]; 
          rowindex = gridStore.store.indexOf(selectedRecord); 
          var models = gridStore.getStore().getRange(); 
          models[rowindex].set("amount", result); 
          TotalOtherCharge = $('.Amount-column-cell .x-grid-cell-inner').text(); 
          alert(TotalOtherCharge); 


         } 
        } 
       }, 

我得到輸出TotalOtherCharge

按照截圖:

2.862.8614.322.885.722.862.865.728.5811.442.86我需要這些號碼拆分&和它向上。

GRID SCREENSHOT

回答