假设用GridPanel和Store完成一个用户管理的功能,现在要删除在GridPanel中已选中的记录,在Controller中实现方式大致如下:
1 2 3 4 5 | var selModel = this.getGridPanel().getSelectionModel(); if(selModel.hasSelection()){ this.getGridStore().remove(selModel.getSelection()); this.getGridStore().sync(); } |