ExtGrid 客户端 查看、添加、删除数据
程序员文章站
2022-05-13 14:11:38
...
请关注新浪微博 账号:屌丝开发控(http://weibo.com/u/3356934744)
获取选中的记录 var records = grid.getSelectionModel().getSelections(); var record = grid.getSelectionModel().getSelected(); 客户端删除数据 var store = this.getStore(); for(var i= 0; i < records.length; i++){ var record = records[i]; store.remove(record); } store.commitChanges(); //添加 _doAdd : function(){ var record = new Ext.grid.PropertyRecord({ ROrderDetailCode: '', InnerProductDetail: '', Count: '', OriginalValue: '', Remark: '' }); this.stopEditing(); this.store.insert(0, record); this.startEditing(0,0); },