views:

1312

answers:

1

I can create context menu for tree and attach to 'contextmenu' event. Code:

contextMenu = new Ext.menu.Menu({
  items: [{
    text: 'Edit',
    iconCls: 'edit',
    hadler: edit
  },...]
})

Ext.getCmp('tree-panel').on('contextmenu', function(node) {
  contextMenu.show(node.ui.getAnchor());
})

But how i can create context menu for grid elements?

+1  A: 

Well, depending on what you want to do you can handle the following GridPanel events in the same manner as your example: contextmenu, cellcontextmenu, containercontextmenu, groupcontextmenu, headercontextmenu, rowbodycontextmenu or rowcontextmenu.

bmoeskau
thank you very much
edtsech