Page 1 of 1
Detect click in table column
Posted: Wed Jul 16, 2014 10:51 am
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?
Re: Detect click in table column
Posted: Wed Jul 16, 2014 12:07 pm
by Paul
This is certainly possible. Is the table on an Online or an Offline/Local form?
Re: Detect click in table column
Posted: Wed Jul 16, 2014 1:12 pm
by soapagent
Online
Re: Detect click in table column
Posted: Wed Jul 16, 2014 2:25 pm
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.
Re: Detect click in table column
Posted: Wed Jul 16, 2014 5:27 pm
by soapagent
Thanks