ext 可编辑表格获取焦点的问题
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();
}
});
}
}
相关推荐
Ext 可编辑表格
Ext 可编辑表格,表格里放combo,textfield,datafield,<br>checkbox
ext可编辑表格
ext可编辑表格Ext.onReady(function() { Ext.QuickTips.init(); //格式化日期 function formatDate(value) { return value ? value.dateFormat('Y年m月d日') : ''; } // 别名 var fm = Ext.form; //构造一个只能包含checkbox的列 var checkColumn = new Ext.grid.CheckColumn({ header: 'Indoor?', dataIndex: 'indoor', width: 55 }); // 构造ColumnModel var cm = new Ext.grid.ColumnModel({ columns: [{ id: 'common', header: 'Common Name', dataIndex: 'common', width: 220, // 使用上边定义好的别名 editor: new fm.TextField({ allowBlank: false }) }, { header: 'Light', dataIndex: 'light', width: 130, editor: new fm.ComboBox({ typeAhead: true, triggerAction: 'all', transform: 'light', lazyRender: true, listClass: 'x-combo-list-small' }) }, { header: 'Price', dataIndex: 'price', width: 70, align: 'right', renderer: 'usMoney', editor: new fm.NumberField({ allowBlank: false, allowNegative: false, maxValue: 100000 }) }, { header: 'Available', dataIndex: 'availDate', width: 95,
可编辑表格Ext.grid.EditorGridPanel
此文档是可编辑表格Ext.grid.EditorGridPanel的说明以及示例的源代码,放到eclipse里面即可运行,显示出效果!
EXT 可编辑 表格的例子
EXT 可编辑 表格的例子 EXT 可编辑 表格的例子
Ext下拉树、下拉表格
项目是myeclipse的web项目,导入项目即可,自己添加ext的js和css文件,资源中没有加入ext的基础文件


