Hi all,
I am trying to disbale button based on some condition. I tried following thing
Code:
var simplePanel = new Ext.form.FormPanel({
standardSubmit: true,
frame:true,
width: 350,
defaults: {width: 230},
items: [ {
handler : function(b, e) {
alert("hello");
},
disabled : function(button) {
//Some condition.
// return true or false
},
scope: this,
text: 'Button1',
width: 70,
xtype: 'button'
}]
});
In above case my button always remains disabled irrespective of function disabled returns true or false.
I dont was to set the button externally(form some other location).
I know that there is no support disabled : function mentioned in documentation. but just tried.
Is there any way by which this can be achieved ?