mardi 24 février 2015

process for creating right-click context menu on grid using architect

Does anyone have a clue on what the process for adding a grid right-click context menu using architect? I can set it up just fine without architect.

I can add the context menu listener using architect resulting in the following:


in grid panel code



Code:



listeners: {
itemcontextmenu: 'onGridpanelItemContextMenu'
},



in view controller code:



Code:



onGridpanelItemContextMenu: function(dataview, record, item, index, e, eOpts) {
e.stopEvent();
mnuContext.showAt(event.xy);
},

Now how do i create the following custom menu attribute in my view controller?

Code:



var mnuContext =newExt.menu.Menu({ items:[{ id:'do-something', text:'Do something'}], listeners:{ itemclick:function(item){switch(item.id){case'do-something':break;}}}});


basically, how can/should I create any custom attribute/property inside a class managed by architect?

Thanks in advance for any help.






process for creating right-click context menu on grid using architect

Aucun commentaire:

Enregistrer un commentaire