datagrid中updateRow方法的使用


 1 function updateRows() {
    //獲取新數據
2 var prows = parent.getRows(); 3 var rows = jQuery('#mydatagrid').datagrid('getRows'); 4 $(rows).each(function (index,row) { 5 for (var i = 0; i < prows.length; i++) { 6 if (row.id == prows[i].id) { 7 //用獲取的新數據替換 想要更改的數據 8 $('#mydatagrid').datagrid('updateRow',{ 9 index: index, 10 row: {qty:prows[i].qty1, 11 priceSum:(prows[i].qty1*row.fbudPrice).toFixed(2) 12 } 13 }); 14 } 15 } 16 }) 17 }


 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM