Hello all,
I have a Panel listing some emails, when the user selects a row, i have to enable a menu, when there's no selections, the menu shall remain disabled, here's my code:
Code:
var topBar = [
{
text: 'Actions',
id: 'actionsMenu',
disabled: true,
menu: [actionMarkAsRead, actionMarkAsUnread, actionDelete]
},
'->',
'Search: ',
' ',
new Ext.app.SearchField({
store: store,
width: 180,
hasSearch: true
})
];
var selectModel = new Ext.grid.CheckboxSelectionModel({
listeners: {
selectionchange: function() {
if(selectModel.getCount() > 0) {
Ext.getCmp('actionsMenu').disabled = false;
}
else {
Ext.getCmp('actionsMenu').disabled = true;
}
}
}
});
As you can see, i have no idea how to set that set of buttons to disabled and enabled ...
anyone can help me ?