setCheck tree from database

I make a menu tree for the role, If checkbox from the tree is checked, the menu will be appear and if not checked the menu should be hidden
I also make a combo to select the user that will be given the right to access the menu.
I want the tree is automatically checked when I select the user in a combo that has its privileges from database.

it’s my code:

it’s my XML from

thx for help…

can i re-loadXML on event button click with include the checked=“1” on response XML? :question: :question:

Could you make and attach completed demo, please?
docs.dhtmlx.com/doku.php?id=othe … leted_demo