How to disable the delete button using if condition in Extjs

Posted by sample on Stack Overflow See other posts from Stack Overflow or by sample
Published on 2011-02-23T12:29:16Z Indexed on 2012/09/22 3:37 UTC
Read the original article Hit count: 147

Filed under:
|

How to disable the delete button using if condition in Extjs for ex;i want to disable the button if it satifies the given if condition else remain enabled. if(validAction(entityHash.get('entity.xyz'),actionHash.get('action.delete')))

This is the grid Delete button code.

Ext.reg("gridheaderbar-inActive", Ad.GridInActiveButton,{     

         xtype: 'tbspacer', width: 5
            });  

Ad.GridCampDeleteButton = Ext.extend(Ext.Toolbar.Button, {

    //text: 'Delete',

    cls: 'ad-img-button',
    width:61,
    height:40,
    iconCls: 'ad-btn-icon',
    icon: '/webapp/resources/images/btn_del.png',
    handler:function(){

        statusChange(this.parentBar.parentGrid, 'Delete')
    }
});

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about extjs