I am trying to dynamically set an active item inside a menu as if it was selected. Browsing through the documentation I could not found a solution. I am trying to this while rendering the whole menu.
caseListStore.each(function(n) {
var menuItem = new Ext.menu.Item({
text: rec.data.name,
value: rec.data.url,
});
if (rec.data.name == "someCondition)"
menuItem.setActive(); //not working
casesMenu.add(menuItem);
});
Have you tried using setDisabled
?
menuItem.setDisabled(true);
If you are using ExtJS 3.4, please use the disable
function.
menuItem.disable();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With