Hi there,

My problem is that how can i disable the particular item from the context menu

the context menu code is
Code:
ctxMenu = new Ext.menu.Menu({
    id:'copyCtx',
    items: [{
            id:'remove',
            handler:Applyme,
            cls:'remove-mi',
            icon: '../images/icon/page_white_paint.png',
            text: 'Apply',
            observer: "Apply"
    },'-',
    {
            id:'remove1',
           // handler:deleteHandler,
            cls:'remove-mi',
            icon: '../images/icon/printer_empty.png',
            text: 'Print',
            observer: "Print"
            disabled: true
    }
    ,'-',
    {
            id:'NewWindow',
            handler:OpenNewTab,
            cls:'remove-mi',
            icon: '../images/new_tab.gif',
            text: 'Open in New Tab',
            observer: "NewTab"
            
    }
    ]
});
i am generating my context menu on the grid, my doubt is how can i disable the particular item

if i pass this for a particular item "disabled: true", this will disable the item.

i tried the following also
Code:
ctxMenu.items.get('NewWindow').disabled=true;
the above code, disable the menu item, but by appearance it looks its enable.




how can i achieve this functionality dynamically


please advice.