1. #1
    Sencha User
    Join Date
    Jun 2011
    Location
    Russia
    Posts
    34
    Vote Rating
    1
    icemanovich is on a distinguished road

      0  

    Default Answered: Remove row in grid by press DEL key.

    Answered: Remove row in grid by press DEL key.


    Hello,

    Can anyone tell me how to use key combinations in gridPanel? I want to remove selected rows in my grid by press DEL key.


    Thanks.

  2. Try this!
    PHP Code:
          {
              
    xtype 'grid',
              
    viewConfig : {
                   
    listeners : {
                       
    'itemkeydown' : function(viewrecorditemindexkey) {
                           if (
    key.getKey() == 46) {//the delete button
                               //delete records
                           
    }  
                       }
                   }
                 }...
             } 

  3. #2
    Sencha User chramer's Avatar
    Join Date
    Feb 2011
    Location
    Chisinau, Moldova
    Posts
    203
    Answers
    42
    Vote Rating
    10
    chramer will become famous soon enough

      0  

    Default


    Try this!
    PHP Code:
          {
              
    xtype 'grid',
              
    viewConfig : {
                   
    listeners : {
                       
    'itemkeydown' : function(viewrecorditemindexkey) {
                           if (
    key.getKey() == 46) {//the delete button
                               //delete records
                           
    }  
                       }
                   }
                 }...
             } 

  4. #3
    Sencha User
    Join Date
    Jun 2011
    Location
    Russia
    Posts
    34
    Vote Rating
    1
    icemanovich is on a distinguished road

      0  

    Default


    Thanks, charmer, it works well!

Thread Participants: 1

Tags for this Thread