1. #1
    Sencha User
    Join Date
    Apr 2011
    Posts
    4
    Vote Rating
    2
    qx2005 is on a distinguished road

      0  

    Default [4.2.1.789] tabbing through grid columns in cell editing mode

    [4.2.1.789] tabbing through grid columns in cell editing mode


    For a grid with plugin of Ext.grid.plugin.CellEditing, if clicks on a cell to start editing, then hitting the tab key will jump to the last cell instead of the next adjacent cell. It was working on Ext 4.1.3.

    The override below we figured actually works:
    Code:
    Ext.override(Ext.selection.RowModel, {
      onEditorTab: function(editingPlugin, e) {
        var me = this,
          view = me.views[0],
          record = editingPlugin.getActiveRecord(),
          header = editingPlugin.getActiveColumn(),
          position = view.getPosition(record, header),
          direction = e.shiftKey ? 'left' : 'right';
    
        do {
          position  = view.walkCells(position, direction, e, me.preventWrap);
        } while(position && !view.headerCt.getHeaderAtIndex(position.column).getEditor());
    
        if (position) {
          editingPlugin.startEditByPosition(position);
        }
      }
    });

  2. #2
    Sencha - Support Team slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    4,770
    Vote Rating
    165
    slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold

      0  

    Default


    Can you post a test case to demonstrate the issue? I used the below code and clicked in the first cell to begin the edit and tabbed and the next cell was selected for edit.

    Code:
    Ext.create('Ext.data.Store', {
        storeId:'simpsonsStore',
        fields:['name', 'email', 'phone'],
        data:{'items':[
            {"name":"Lisa", "email":"lisa@simpsons.com", "phone":"555-111-1224"},
            {"name":"Bart", "email":"bart@simpsons.com", "phone":"555-222-1234"},
            {"name":"Homer", "email":"home@simpsons.com", "phone":"555-222-1244"},
            {"name":"Marge", "email":"marge@simpsons.com", "phone":"555-222-1254"}
        ]},
        proxy: {
            type: 'memory',
            reader: {
                type: 'json',
                root: 'items'
            }
        }
    });
    
    
    Ext.create('Ext.grid.Panel', {
        title: 'Simpsons',
        store: Ext.data.StoreManager.lookup('simpsonsStore'),
        columns: [
            {header: 'Name',  dataIndex: 'name', editor: 'textfield'},
            {header: 'Email', dataIndex: 'email', flex:1,
                editor: {
                    xtype: 'textfield',
                    allowBlank: false
                }
            },
            {header: 'Phone', dataIndex: 'phone'}
        ],
        selType: 'cellmodel',
        plugins: [
            Ext.create('Ext.grid.plugin.CellEditing', {
                clicksToEdit: 1
            })
        ],
        height: 200,
        width: 400,
        renderTo: Ext.getBody()
    });

Thread Participants: 1

Tags for this Thread

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar