I would like to know if I can trigger a drop event by pressing enter on a TreePanel. I am not able to fire the event manually, which I have achieved so far:
mediaCenter.getEl().addKeyMap({
eventName: "keyup",
binding: [{
key: Ext.EventObject.ENTER,
fn: function() {
var node = mediaCenter.view.getSelectionModel().getSelection();
node = node[0];
var model = mediaCenter.view.getSelectionModel();
var args = new Object({
node: node,
dropPosition: 1
});
grid.fireEvent('beforeDrop', args);
console.log(node);
}
}]
}));
I want when the user press enter, the node that is selected go to the grid that I created.
Thank you.