1. #1
    Sencha User
    Join Date
    Jun 2011
    Location
    Warsaw, Poland
    Posts
    38
    Vote Rating
    1
    Answers
    1
    sasklacz is on a distinguished road

      0  

    Default Unanswered: How to get the event when selecting column with TAB ?

    Unanswered: How to get the event when selecting column with TAB ?


    I have a TreePanel with some columns defined. One of them is a 'templatecolumn' which shows some colored div. Now I'd like to catch the event, when I'm moving between the columns using `TAB` button (as seen on the screen. I've selected 'predecessors' column and after pressing TAB I'm in the Color column), so that on entering the templatecolumn I can change the html, as right now my editor input field is shown after the div. I've tried attaching all listeners I've found in the docs, but only click seems to work here. Any ideas how to solve this ?

    Code:
    {
        header: 'Color',
        xtype: 'templatecolumn',
        width: 50,
        tpl: '<div class="color-column-inner" style="background-color:#{TaskColor}">&nbsp;</div>',
        listeners: {
            click : function(panel, el, a, b, event, record) {
                console.log('click');
            },
            keypress: function () {
                console.log('keypress');
            },
            keydown: function () {
                console.log('keydown');
            },
            beforestartedit: function () {
                console.log('beforestartedit');
            },
            focus: function() {
                console.log('focus');
            },
            containerkeydown: function() {
                console.log('containerkeydown');
            }
        }
    }
    Attaching two images - html structure when the columns are rendered and a screenshot of what it looks like now :

    column_html.png


    columns.png
    Using ExtGantt / ExtScheduler from Bryntum ? I can help you integrate and implement it.

  2. #2
    Sencha - Community Support Team
    Join Date
    Jan 2012
    Posts
    1,376
    Vote Rating
    115
    Answers
    346
    vietits is a splendid one to behold vietits is a splendid one to behold vietits is a splendid one to behold vietits is a splendid one to behold vietits is a splendid one to behold vietits is a splendid one to behold

      0  

    Default


    Is your grid plain or enable to edit with celleditor or roweditor? If it is plain, how can you TAB between columns? If it is a editable grid then you should listen key events from cell editor. See here as an example http://www.sencha.com/forum/showthre...able-grid-cell, post #3.

Thread Participants: 1

Tags for this Thread