Dynamic loading of a xhtmlxTree context menu (based on node

Hello support staff,



First of all I would like to thank you for a great javascript library. Also by looking at the knowledgebase entries it seems that you are all doing a great job providing us with neccesary support. Thank you!



At the moment we are adding a contextual menu to a dhtmlxtree. All our nodes in the tree are of specified types (schema’s) and we want our contextmenu to give different options based on the type.



Most of the code to do this is allready done. At the moment, when we right-click a node, and view the transferred XML data, we see the correct context menu data, but this data is not used. The only context menu that is shown is the default menu that has been loaded at the first init.



I’ve browsed through the knowledge base in search of a solution, and it seems there have been several “fixes” for some people in the past, usually with the comment that a menu.clearAll option would be added to the next version. The timestamps on these knowledgebase items are before 2009.



In the current version that we bought last week, the menu.clearAll method doesnt seem to exist.



Is this function implemented in the current version in one way or another ? Or could you provide me with a way to reach the goal we are looking for (reloading the context menu on each ‘onBeforeContextMenu’ event?



Best regards,

Damien Overeem








menu 2.5 beta has clearAll method. It is already available on our website