# dialog: selecting a row in a table with ENTER ?

**URL:** <https://techcommunity.softwareag.com/t/dialog-selecting-a-row-in-a-table-with-enter/98018>\
**Category:** Forum\
**Tags:** Adabas-Natural, Natural, Natural-Code-Samples\
**Created:** [August 12, 2011, 12:17pm UTC](https://techcommunity.softwareag.com/t/dialog-selecting-a-row-in-a-table-with-enter/98018 "2011-08-12T12:17:25Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ronald\_Wijchers](https://avatars.discourse-cdn.com/v4/letter/r/e5b9ba/32.png) [@Ronald\_Wijchers](https://techcommunity.softwareag.com/u/Ronald_Wijchers)\
**Post date:** [August 12, 2011, 12:17pm UTC](https://techcommunity.softwareag.com/t/dialog-selecting-a-row-in-a-table-with-enter/98018/1 "2011-08-12T12:17:25Z")

</div>

Hi all,

I posted this in the SPoD forum but maybe this is a better place…

Anyway, the subject says it all. I have this wonderfull dialog which contains a table with all the subroutines defined in the current active source. When I double click on one of the names the source window jumps to the subroutine definition. So far so good, but I haven’t been able to figure out how to get this to work using the cursor keys and ENTER. There is no event related to using the enter key and you cannot use accelerator keys for selection in a table. Any ideas ? I am still a bit new to these kind of apps, so maybe I missing something obvious ?

thanks,  
Ronald

---

<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:** [August 12, 2011, 1:32pm UTC](https://techcommunity.softwareag.com/t/dialog-selecting-a-row-in-a-table-with-enter/98018/2 "2011-08-12T13:32:19Z")

</div>

Haven’t found a way so far, while you can navigate with the cursor keys within a table just fine  
the ENTER key will not be sent to the table control, it will be reflected for either the default  
button for the dialog or the one currently having the focus.

---

<div class="post-metadata">

**Author:** ![Ronald\_Wijchers](https://avatars.discourse-cdn.com/v4/letter/r/e5b9ba/32.png) [@Ronald\_Wijchers](https://techcommunity.softwareag.com/u/Ronald_Wijchers)\
**Post date:** [August 12, 2011, 3:14pm UTC](https://techcommunity.softwareag.com/t/dialog-selecting-a-row-in-a-table-with-enter/98018/3 "2011-08-12T15:14:02Z")

</div>

aha… your reaction did trigger something in my brain 🙂 :

what if I set up a default button on the dialog which when “clicked” sends an event to the same dialog (is that possible, instead of sending it to another dialog?) which then would trigger the code to get the selected row from the table ? Would that work somehow ?

---

<div class="post-metadata">

**Author:** ![Ronald\_Wijchers](https://avatars.discourse-cdn.com/v4/letter/r/e5b9ba/32.png) [@Ronald\_Wijchers](https://techcommunity.softwareag.com/u/Ronald_Wijchers)\
**Post date:** [August 12, 2011, 3:30pm UTC](https://techcommunity.softwareag.com/t/dialog-selecting-a-row-in-a-table-with-enter/98018/4 "2011-08-12T15:30:28Z")

</div>

yes, that’s it!

I just created an eventhandler called “select” for the dialog and sent this event to the dialog when the button (with accelerator key ENTER) is clicked.

thanks for the “wake-up” hints, Wolfgang 🙂

---

<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:** [August 12, 2011, 4:01pm UTC](https://techcommunity.softwareag.com/t/dialog-selecting-a-row-in-a-table-with-enter/98018/5 "2011-08-12T16:01:38Z")

</div>

Good stuff 8)

You are very welcome, glad I’ve at least been able to help indirectly 😉

---

<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, 3:00pm UTC](https://techcommunity.softwareag.com/t/dialog-selecting-a-row-in-a-table-with-enter/98018/6 "2021-04-02T15:00:44Z")

</div>


