0
I wonder if there’s any way I can trigger a drop event by pressing enter on a treepanel. I’m not able to fire the event manually, which I’ve 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 that when the user presses enter, the node that is selected goes to the grid that I created.
Thank you.