Detect click in table column

Please do not use to report errors- use your regional help desk.
Please mark posts as being for RPG or RDMLX (LANSA) developer.
To subscribe by email, display this forum, scroll to the end and select ‘Subscribe Forum’.
Post Reply
soapagent
Posts: 93
Joined: Mon Jul 16, 2012 6:19 pm

Detect click in table column

Post by soapagent »

I'm building a table where I'd like the user to be able to click on a particular column and in the code detect which column and row was clicked. Is this possible?
Paul

Re: Detect click in table column

Post by Paul »

This is certainly possible. Is the table on an Online or an Offline/Local form?
soapagent
Posts: 93
Joined: Mon Jul 16, 2012 6:19 pm

Re: Detect click in table column

Post by soapagent »

Online
Paul

Re: Detect click in table column

Post by Paul »

In the case of a table an Online form view, reading the event sender ID (CurrentOp.SenderID property) will identify which element triggered the event.

In RDMLX code for LongRange....

Code: Select all

#Com_Owner.Get_EventSender Senderid_N(1) Senderid(#uSender1)
would return the column name and ....

Code: Select all

#Com_Owner.Get_EventSender Senderid_N(2) Senderid(#uSender2)
would return the row ID of the table cell that triggered the event.

The CurrentOp.SenderID is a list property of the fully qualified name of the UI element that triggered the event in reverse order. In the case of clicking on a cell in a table on an Online form the CurrentOp.SenderID would contain the following;
  • CurrentOp.SenderID%1 = Column Name
    CurrentOp.SenderID%2 = Row ID
    CurrentOp.SenderID%3 = Table Name
    CurrentOp.SenderID%4 = Form Name (Form in case of the main form)
Shipped LongRange LANSA Online examples of using the event sender ID to identify the element that triggered the event can be found in LRDM0002 and LRDM0004.

Please try this out and post again if you have any problems with this.
soapagent
Posts: 93
Joined: Mon Jul 16, 2012 6:19 pm

Re: Detect click in table column

Post by soapagent »

Thanks
Post Reply