您的位置:首页 > Web前端 > JavaScript

ExtJS03:Grid表格中删除一行问题

2013-10-06 18:39 288 查看
在EXT的grid中,只删除Grid中的一行,但是不删除数据库,怎样执行?EXT中没有像ASP中的GridViewRow ,请问该怎么解决?
grid.getSelectionModel().getSelected();//获取选中的第一条记录,返回record类型grid.getSelectionModel().getSelections();//获取选中的全部记录,返回一个数组,里面全是record类型grid.store.remove(record);//参数是record类型的,移除该数据grid.store.removeAt(rowIndex);//参数是行数,移除该行grid.store.removeAll();//移除全部数据有了上面这些,删除就简单了删除选中的第一条记录grid.store.remove(grid.getSelectionModel().getSelected());删除选中的全部记录var records = grid.getSelectionModel().getSelections();for(var i = 0,len = records.length;i<len;i++ ){grid.store.remove(records[i]);}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐