PDA

View Full Version : Remove row in grid by press DEL key.



icemanovich
22 Jan 2012, 10:48 PM
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.

chramer
23 Jan 2012, 4:39 AM
Try this!


{
xtype : 'grid',
viewConfig : {
listeners : {
'itemkeydown' : function(view, record, item, index, key) {
if (key.getKey() == 46) {//the delete button
//delete records
}
}
}
}...
}

icemanovich
23 Jan 2012, 5:16 AM
Thanks, charmer, it works well!