How can I unchecked an item of dhtmlxmenu?

Hi,

I have to do something like this:

menu.forEachItem(function(id) {
if (id.substr(0,10)==“pacis_pac_”)
menu.uncheked(id); or menu.setRadioChecked(group, id, false);
});

It’s posible? How?

Thanks,

Hi,

checkbox state is set by setCheckboxState method:

/checked state/
menu.setCheckboxState(id,true);

/unchecked/
menu.setCheckboxState(id,false);

OK! It’s works! But when I do menu.setCheckboxState(id,false); the icon isn’t radio button unchecked, is a checkbox unchecked. And when i click in one, all the unchecked icons convert to unchecked radio button.

Sorry for my bad english. Do you understand?

Thank you very much.

Sorry for the misleading information.

In case of “radio” button you need to use setRadioChecked(group,itemId) method to check the button. To uncheck it you need to call private method _setRadioState:

menu._setRadioState(itemId,false);

Perfect! Thanks you.