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]);}
相关文章推荐
- 在可编辑表格EditorGrid中,我选择一行已输入的数据,点击删除按钮,该行数据将被删除,然后当我点击表单提交按钮时,已经被删除的那一行数据仍然被插入数据库中
- 在可编辑表格EditorGrid中,我选择一行已输入的数据,点击删除按钮,该行数据将被删除,然后当我点击表单提交按钮时,已经被删除的那一行数据仍然被插入数据库中
- Extjs gridpanel使用遇到selectionchange被多次触发问题解决办法,grid表格复选框无法取消选中
- jqGrid取值问题表格动态的加行,删除行,保存
- JQuery - 表格新增或删除一行
- javascript表格操作大全:表格排序/倒序、动态添加列、批量删除、删除一行、隔行变色、鼠标悬浮切换背景色、全选/反选。(IE、火狐都兼容)
- ExtJS4.2学习(四)Grid表格中文排序问题(转)
- 编写表格树GridTree过程遇到的问题
- js动态生成表格、动态删除一行
- NO.7 表格删除一行前面的序号重新顺序排列
- removeChild删除表格数据时遇到的问题
- 基于jquery的实现简单的表格中增加或删除下一行
- js操作表格操方法,增加,修改,删除,一行记录
- JQ点击按钮动态克隆一行表格以及删除表格
- Ant Design of React Table 删除一行后selectedRowKeys残留和显示打钩残留问题
- js 动态表格添加一行删除一行
- Ajax方式删除表格一行数据示例代码
- 基于jquery的实现简单的表格中增加或删除下一行
- 在JS表格中怎么删除一行(不是指定行,而是我表格中每行后面都有一个删除按钮,按其中一个按钮就删除那一行