默认的,按回车后是切换到下一行,下面的代码按回车后是切换到下一列
- Ext.override(Ext.grid.RowSelectionModel, {
- onEditorKey : function(field, e) {
- // alert(\'go\');
- var k = e.getKey(), newCell, g = this.grid, ed = g.activeEditor;
- var shift = e.shiftKey;
- Ext.log(\'k:\' + k);
- if (k == e.ENTER) {
- e.stopEvent();
- ed.completeEdit();
- if (shift) {
- newCell = g.walkCells(ed.row, ed.col - 1, -1,
- this.acceptsNav, this);
- } else {
- // alert(\'go\');
- newCell = g.walkCells(ed.row, ed.col + 1, 1,
- this.acceptsNav, this);
- }
- } else if (k == e.TAB) {
- e.stopEvent();
声明:本站教程文章版权为一起Ext(http://www.17ext.com/)所有,转载请注明出处