Loading context menu data depending on right clicked item.

I am creating a webix tree and attaching the tree with a context menu. I want different options in context menu when folder is right clicked and different options when leaf is right clicked. How to do that?

Data in the ui.contextmenu can be filtered/reloaded depending on any conditions. You can use the onBeforeShow as follows:

http://webix.com/snippet/632f5604