WelcomeForumsCommunityhow to bind contextmenu to the wijtree?

Wijmo Team Member
charlieLu posted on June 6, 2012 at 8:26 am link

how to bind contextmenu to the wijtree?
could i select the treenode when i click the right mousebutton

Wijmo Team Member
abdiasm posted on June 6, 2012 at 1:00 pm link

you can set the trigger and triggerEvent options of wijmenu using the following code :

$(“#menu”).wijmenu({
trigger: “#tree”,
triggerEvent: “rtclick”
});

and you can select the treenode which is right clicked using this code :

$(“.wijmo-wijtree-node”).mousedown(function (e) {
if (e.button == 2)
$(this).parent().wijtreenode(“option”, “selected”, “true”);
});

Answer
Wijmo Team Member
charlieLu posted on June 6, 2012 at 2:34 pm link

thanks ,
$(“#menu”).wijmenu({
trigger: “#tree”,
triggerEvent: “rtclick”
});
the contextmenu show on the tree
but i want to show on the selected node

Answer
Wijmo Team Member
lianbo posted on June 7, 2012 at 2:15 am link

Try to set trigger to “.wijmo-wijtree-node .ui-state-active”

Answer

Tagged: 

This topic has 3 voices, contains 3 replies, and was last updated by  lianbo 350 days ago.

You must be logged in to reply to this topic.