Results 1 to 3 of 3

Thread: How to remove a tool bar button dynamicaly,

  1. #1

    Default How to remove a tool bar button dynamicaly,

    following is my tool bar in data grid,i want to remove the Add button according to user logged,how can i achieve this? please help...


    items: {
    xtype: 'grid',
    id:'asset-grid',
    tbar:[{
    text:'Add Asset',
    id:'butAdd',
    tooltip:'Add a new Asset',
    iconCls:'add',
    handler: function(){}
    }, '-', {
    text:'Edit Asset',
    tooltip:'Edit the selected Asset',
    iconCls:'option',
    handler: function(){}
    }
    },'-',{
    text:'Delete Asset',
    tooltip:'Remove the selected Asset',
    iconCls:'remove',
    handler: function(){}
    } // end of handler
    }], //end of tbar
    height:290,
    viewConfig: {
    forceFit:true,
    enableRowBody:true,
    showPreview:true,
    emptyText: 'No records to display.',
    getRowClass : this.applyRowClass
    },
    store: ds,
    cm: cmPartCatList,
    sm: sm,
    loadMask:true,
    trackMouseOver:true,
    stripeRows: true
    }

  2. #2
    Sencha User jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    DC Area =)
    Posts
    16,364

    Default

    1) we have a help section, have you seen it?
    2) Please post code in code tags
    3) It all depends on HOW you code your applications. Look at the api, the toolbar now extends container, which means it has add/remove

  3. #3

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •