52
Views
3
Comments
[ZTree Reactive] How to add a menu on right click on any node.?
ztree-reactive
Reactive icon
Forge asset by Pedro Neto
Application Type
Reactive

Hi, 

I am using zTree Reactive in my oustsystems app and not able to implement the menu which pop-ups on OnRightClick. I have created a container, like this

But I am unable to implement the Javascript which should be implemented in OnRightClick Action of zTree. 

Please help me the JS required to show this menu.

2021-03-18 21-03-15
Benjith Sam
 
MVP

Hi Keshav,

To assist you with the implementation, I have created a sample demo app that demonstrates the exact functionality you requested. 

Unfortunately, I won't be able to provide a comprehensive explanation for every detail of the implementation. However, you can study the following sections to understand the details of the implementation approach. 

  • Screen Action: zTreeOnRightClickEvent
  • Scripts: zTree_Custom

Demo link: zTree_RightClickMenu

Refer to the attached oml file.

I hope this helps you!


Kind regards,

Benjith Sam

zTree_RightClickMenu_Task.oml
UserImage.jpg
Omar AbdElhadi

when  i copy same javascript file on click it tell me 

[2023-09-01T10:10:33.718Z]: showRMenu is not defined 


2021-03-18 21-03-15
Benjith Sam
 
MVP

Hi Omar,

The showRMenu function is defined within the zTree_Custom script file. Ensure that you've referenced the zTree_Custom js script file in the screen's Required Scripts property, as indicated in the image below:

I hope this helps you!


Kind regards,

Benjith Sam

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.