Results 1 to 3 of 3

Thread: Remove row in grid by press DEL key.

  1. #1
    Sencha User
    Join Date
    Jun 2011
    Location
    Russia
    Posts
    36
    Vote Rating
    1
      0  

    Default 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
    223
    Answers
    42
    Vote Rating
    12
      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
    36
    Vote Rating
    1
      0  

    Default

    Thanks, charmer, it works well!

Tags for this Thread

Posting Permissions

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