I can create context menu for tree and attach to \'contextmenu\' event. Code:
contextMenu = new Ext.menu.Menu({
items: [{
text: \'Edit\',
iconCls: \'ed
Create a View file
init : function() {
this.control(
'countrylist' : {
itemcontextmenu : this.contextMenuBox
}
});
},
contextMenuBox:function( view, record, item, index, e, eOpts ){
if(record.data.status=='Y'){
var menu = Ext.create('Ext.menu.Menu',{
items: [{
text: 'Do something'
}]
});
e.stopEvent();
menu.showAt(e.getXY());
}
else{
var menu = Ext.create('Ext.menu.Menu',{
items: [{
text: 'Don\'t'
}]
});
e.stopEvent();
menu.showAt(e.getXY());
}
},