Problem Statement: How to enable disable buttons in ExtJS 3.2.1?
Problem Solution: ExtJs button is basically instance of Ext.Button class. There are two ways we can enable/disable
In order to set any button enabled or disabled, config option disabled can be set as true or false.
PROGRAMMATICALLY
Read more : Ext JS 3.2.1 API DOCS (http://extjs.cachefly.net/ext-3.2.1/docs/)
Problem Solution: ExtJs button is basically instance of Ext.Button class. There are two ways we can enable/disable
- Using config option
- Programmatically enabling & disabling
In order to set any button enabled or disabled, config option disabled can be set as true or false.
Ext.Button({
text: 'Edit',
id: 'edit',
cls: 'edit_class',
diasabled: 'true', // button is disabled
listeners: {
'click': function () {}
}
})
Ext.Button({
text: 'Edit',
id: 'edit',
cls: 'edit_class',
diasabled: 'false', // button is enabled
listeners: {
'click': function () {}
}
})
PROGRAMMATICALLY
Ext.getCmp('edit').setDisabled(true);
Ext.getCmp('edit').setDisabled(false);
Read more : Ext JS 3.2.1 API DOCS (http://extjs.cachefly.net/ext-3.2.1/docs/)
No comments:
Post a Comment