1. #1
    Ext User
    Join Date
    Jul 2007
    Posts
    72
    Vote Rating
    0
    gurusingh is on a distinguished road

      0  

    Post disable a item in the context menu

    disable a item in the context menu


    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.

  2. #2
    Ext User
    Join Date
    Jul 2007
    Posts
    72
    Vote Rating
    0
    gurusingh is on a distinguished road

      0  

    Default Solved

    Solved


    on rowcontextmenu

    i am checking the condition, then calling the below function

    i am passing the id as menu item ID


    Code:
    enablemenus=function(id){
    ctxMenu.items.get(id).disable();
    }

  3. #3
    Sencha User
    Join Date
    Dec 2011
    Location
    Bangalore, India
    Posts
    17
    Vote Rating
    0
    sachindev is on a distinguished road

      0  

    Default


    same problem i am facing in Ext JS 4.. did not get solution yet.
    this.getMenuItemEdit().setDisable(true) did not work. any thoughts??

  4. #4
    Sencha User
    Join Date
    Dec 2011
    Location
    Bangalore, India
    Posts
    17
    Vote Rating
    0
    sachindev is on a distinguished road

      0  

    Default [solved]disable menu item of split button menu

    [solved]disable menu item of split button menu


    [solved] following code worked for Ext js 4.

    this.getDeleteValueSplitBtn().menu.items.get('editCategoryValueBtnId').setDisabled(true);

  5. #5
    Sencha User
    Join Date
    Apr 2012
    Posts
    3
    Vote Rating
    0
    ngocdoangia is on a distinguished road

      0  

    Default


    ctxMenu.items.get('NewWindow').disabled=true;
    thank you very much
    cty thiet bi van phong pham chuyen mua ban văn phòng phẩm tất cả đều lam dep

Thread Participants: 2

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..."