# right click textgridsss2

**URL:** <https://techcommunity.softwareag.com/t/right-click-textgridsss2/80377>\
**Category:** Forum\
**Tags:** Adabas-Natural, Natural, NaturalONE, Natural-for-AJAX\
**Created:** [March 4, 2009, 2:56am UTC](https://techcommunity.softwareag.com/t/right-click-textgridsss2/80377 "2009-03-04T02:56:10Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/techcommunity/original/3X/c/d/cd19967bb605d28a72d77eb83a1cae22f3df2eb8.svg) [@system](https://techcommunity.softwareag.com/u/system)\
**Post date:** [March 4, 2009, 2:56am UTC](https://techcommunity.softwareag.com/t/right-click-textgridsss2/80377/1 "2009-03-04T02:56:10Z")

</div>

From the documentation and examples (see attached pdf doc) it seems that it MIGHT be possible to have a submenu appear when a user right clicks on a row in a grid.

For example if I have a grid and the user right clicks, can I show a sub menu that gives him a few choices.  
[example.pdf](https://techcommunity.softwareag.com/uploads/short-url/sBMldxJafUymudivuMvgPKCv3Dc.pdf) (162 KB)

---

<div class="post-metadata">

**Author:** ![Christine\_Zimmermann](https://avatars.discourse-cdn.com/v4/letter/c/839c29/32.png) [@Christine\_Zimmermann](https://techcommunity.softwareag.com/u/Christine_Zimmermann)\
**Post date:** [March 4, 2009, 11:55am UTC](https://techcommunity.softwareag.com/t/right-click-textgridsss2/80377/2 "2009-03-04T11:55:30Z")

</div>

To work with contextmenus in NATPAGES do the following:

1. Add an xcipopupmenu control to your page. (For instance as last control).
2. Add an njx:eventdata control to your page. This control is described in the NJX documentation.
3. For instance in your grid: set the oncontextmenumethod=“myevent”
4. In your Natural code react to the \*reactOnContextMenuRequest and \*reactOnSelect events correspondingly. (Fill the xcipopupmenu structure / react to the selection).

Best Regards,  
Christine

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/techcommunity/original/3X/c/d/cd19967bb605d28a72d77eb83a1cae22f3df2eb8.svg) [@system](https://techcommunity.softwareag.com/u/system)\
**Post date:** [March 4, 2009, 8:41pm UTC](https://techcommunity.softwareag.com/t/right-click-textgridsss2/80377/3 "2009-03-04T20:41:54Z")

</div>

I could not find any reference to the njx:eventdata control anywhere in application designer. I am sure I must be missing something, but could you please give me an idea of where to find the control?

---

<div class="post-metadata">

**Author:** ![Christine\_Zimmermann](https://avatars.discourse-cdn.com/v4/letter/c/839c29/32.png) [@Christine\_Zimmermann](https://techcommunity.softwareag.com/u/Christine_Zimmermann)\
**Post date:** [March 5, 2009, 12:10pm UTC](https://techcommunity.softwareag.com/t/right-click-textgridsss2/80377/4 "2009-03-05T12:10:16Z")

</div>

Natural for AJAX comes with 2 documentations:

1. The general Applicatio Designer documentation: In Development Workplace under Tools & Documentation.
2. A Natural specific part: This contains controls which are specific for Natural. It is directly accessible in the NJX installation, not via the Development Workplace.

NJX:EVENTDATA is a Natural specific control. You’ll find it in the chapter Working with Controls / Natural for Ajax Controls.

In the control palette you’ll find it in the tab Natural Extensions.

Best Regards,  
Christine

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/techcommunity/original/3X/c/d/cd19967bb605d28a72d77eb83a1cae22f3df2eb8.svg) [@system](https://techcommunity.softwareag.com/u/system)\
**Post date:** [March 5, 2009, 7:04pm UTC](https://techcommunity.softwareag.com/t/right-click-textgridsss2/80377/5 "2009-03-05T19:04:35Z")

</div>

On my version of Application Designer the eventdata control does not exist (see attached screenprint). Perhaps there is some setup problem. However, I edited the XML file and added the control that way (saw an example in the documentation).

I am still not sure how to get the context menu to appear once I right click. I know how to interpret the click, but don’t know how to make the menu appear.

Thanks  
[eventdata.pdf](https://techcommunity.softwareag.com/uploads/short-url/c6J6LjsrnR3loisFsL06wqlcDUg.pdf) (231 KB)

---

<div class="post-metadata">

**Author:** ![Christine\_Zimmermann](https://avatars.discourse-cdn.com/v4/letter/c/839c29/32.png) [@Christine\_Zimmermann](https://techcommunity.softwareag.com/u/Christine_Zimmermann)\
**Post date:** [March 5, 2009, 10:52pm UTC](https://techcommunity.softwareag.com/t/right-click-textgridsss2/80377/6 "2009-03-05T22:52:02Z")

</div>

You have an NJX installation do you? This control is only available in the Natural For Ajax product, not in the Java version of Application Designer.  
Which version have you installed?

It is also only visible for a NATPAGE. If you create a PAGE ist is not available. Did you create a NATPAGE?

Best Regards,  
Christine

---

<div class="post-metadata">

**Author:** ![Jan\_Van\_Achter](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/jan_van_achter/32/164_2.png) [@Jan\_Van\_Achter](https://techcommunity.softwareag.com/u/Jan_Van_Achter)\
**Post date:** [September 22, 2009, 1:40pm UTC](https://techcommunity.softwareag.com/t/right-click-textgridsss2/80377/7 "2009-09-22T13:40:19Z")

</div>

Hi,  
This is information I also tried to find in the documentation. Can you point me out where I can find documentation on how to use (fill) the XCIPOPUPMENU.  
It also seems to me that the event reactonselect is not in the generated adapter.  
Best regards,  
Jan

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/techcommunity/original/3X/c/d/cd19967bb605d28a72d77eb83a1cae22f3df2eb8.svg) [@system](https://techcommunity.softwareag.com/u/system)\
**Post date:** [September 22, 2009, 7:32pm UTC](https://techcommunity.softwareag.com/t/right-click-textgridsss2/80377/8 "2009-09-22T19:32:38Z")

</div>

> [@Jan Van Achter](#):
>
> Hi,  
> This is information I also tried to find in the documentation. Can you point me out where I can find documentation on how to use (fill) the XCIPOPUPMENU.  
> It also seems to me that the event reactonselect is not in the generated adapter.  
> Best regards,  
> Jan

Hi Jan

I eventually got the popupmenu to work after much experimenting. Attached is a program with selected code snippets that I used.

Regards

Demos  
[progex.txt](https://techcommunity.softwareag.com/uploads/short-url/vwDas1FwXOL5BnuffQBlzUiNdU7.txt) (2.57 KB)

---

<div class="post-metadata">

**Author:** ![Jan\_Van\_Achter](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/jan_van_achter/32/164_2.png) [@Jan\_Van\_Achter](https://techcommunity.softwareag.com/u/Jan_Van_Achter)\
**Post date:** [September 22, 2009, 8:25pm UTC](https://techcommunity.softwareag.com/t/right-click-textgridsss2/80377/9 "2009-09-22T20:25:38Z")

</div>

Thanks, Demos!

Meanwhile, I managed to make it work myself.  
By the way if you use the xcieventdata, you don’t have to loop to see which row is selected.  
Following code in your example:  
FOR #INDEX 1 100  
IF TASKPROP.SELECTED (#INDEX) = TRUE  
MOVE #TASK-ISN-TABLE (#INDEX) TO TASKNUMBER  
ESCAPE BOTTOM  
END-IF  
END-FOR  
Could be changed in:  
#INDEX := XCIEVENTDATA.XCIINDEX  
MOVE #TASK-ISN-TABLE (#INDEX) TO TASKNUMBER

Thanks again.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/techcommunity/original/3X/c/d/cd19967bb605d28a72d77eb83a1cae22f3df2eb8.svg) [@system](https://techcommunity.softwareag.com/u/system)\
**Post date:** [April 2, 2021, 2:51pm UTC](https://techcommunity.softwareag.com/t/right-click-textgridsss2/80377/10 "2021-04-02T14:51:36Z")

</div>


