Results 1 to 2 of 2

Thread: editorGrid?tab enter??

  1. #1
    Sencha User
    Join Date
    Feb 2009
    Posts
    116
    Vote Rating
    0
      0  

    Default

    win???ext2.2.1?
    EditorGridPanel????????????????
    ??????????????????

    ?????????????????????

    editor : new fm.TextField({
    allowBlank: true,
    listeners: {
    render: function(c) {
    c.getEl().on({
    keypress: onKeypress,
    keydown: onKeypress,
    scope: c
    });
    ???}
    }
    })

    ?????
    // ??????
    function onKeypress (e) {
    var k = e.getKey();
    if((k == e.TA || (k == e.ENTER)) {
    e.stopEvent();
    }
    }
    ?????????TAB?ENTER??????????????
    ?????????????????????????????

  2. #2
    Ext User
    Join Date
    Mar 2008
    Posts
    6
    Vote Rating
    0
      0  

    Default

    http://www.extjs.com/forum/showthread.php?t=4888
    ?????????????????

    PHP Code:
    var grid = new Ext.grid.EditorGridPanel({...})
    var 
    sm grid.getSelectionModel();
    sm.onEditorKey=function(fielde){
        var 
    e.getKey(), newCellthis.grided g.activeEditor;
        var 
    shift e.shiftKey;
        if(
    == e.TAB){
            
    e.stopEvent();
            ...
        }else if(
    == e.ENTER){
            
    e.stopEvent();
            ...
        }else if(
    == e.ESC){
            
    ed.cancelEdit();
            ...
        }
        ...
    }; 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •