ext 可编辑表格获取焦点的问题
时间:2010-12-23
来源:互联网
现在项目中用的是可编辑表格,输入一个数据就保存,如何再数据保存成功后按下回车键自动跳到下一个单元格
JScript code
JScript code
listeners: { "afteredit": function(e) { var grid = Ext.getCmp('ordergrid'); var r = e.record; //得到当前行所有数据 var f = e.field; //得到修改列 var v = e.value; //得到修改列修改后值 // alert(v); //通过ajax请求修改数据 Ext.Ajax.request({ url: "updateSurface.action", method: "POST", params: { fieldName: f, fieldValue: v, ID: r.data.id }, success: function(r) { grid.getStore().reload(); grid.getSelectionModel().selectRow(0,false);// grid.getView().focusCell(0,0); //选中的获取焦点 }, failure: function() { MessageBox("提示", "操作失败!", Ext.MessageBox.ERROR); grid.getStore().reload(); } }); } }
作者: angel21li 发布时间: 2010-12-23
大家帮帮忙!不知道怎么解决!
作者: angel21li 发布时间: 2010-12-24
grid.getView().focusCell(0,0); //选中的获取焦点
你试一下
focusCell(e.row ,e.column + 1 );
afteredit : ( Object e )
Fires after a cell is edited. The edit event object has the following properties <br /> <ul style="padding:5px;paddin...
Fires after a cell is edited. The edit event object has the following properties
grid - This grid
record - The record being edited
field - The field name being edited
value - The value being set
originalValue - The original value for the field, before the edit.
row - The grid row index
column - The grid column index
你试一下
focusCell(e.row ,e.column + 1 );
afteredit : ( Object e )
Fires after a cell is edited. The edit event object has the following properties <br /> <ul style="padding:5px;paddin...
Fires after a cell is edited. The edit event object has the following properties
grid - This grid
record - The record being edited
field - The field name being edited
value - The value being set
originalValue - The original value for the field, before the edit.
row - The grid row index
column - The grid column index
作者: didiaodezhu 发布时间: 2010-12-24
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28