向GridPanel批量添加数据,复选框选中添加的行
批量对GridPanel添加数据
for(var p=0;p<rs.length;p++) { var record=new Ext.data.Record( { LINENO:rs[p].get("LINENO"), ITEMNO:rs[p].get("ITEMNO"), ITEMNAME:rs[p].get("ITEMNAME"), QTY:rs[p].get("QTY"), UNITPRICE:rs[p].get("UNITPRICE"), TOTALAMOUNT:rs[p].get("TOTALAMOUNT"), EXCHANGERATE:rs[p].get("EXCHANGERATE"), MONEY:rs[p].get("MONEY"), RATEMONEY:rs[p].get("RATEMONEY"), GUANRATE:rs[p].get("GUANRATE"), GUANMONEY:rs[p].get("GUANMONEY"), VATRATEMONEY:rs[p].get("VATRATEMONEY"), VAT:rs[p].get("VAT"), VATMONEY:rs[p].get("VATMONEY") } ); gridArray.store.insert(p, record);//p标示数据在store中的索引位置 gridArray.getSelectionModel().selectRow(p,true); //选中添加行的数据 }