Page 1 of 1

How to insert dynamic anchor/link in list/table

Posted: Thu Mar 29, 2018 2:41 pm
by gillettd
Hi,

What's the easiest way to have a dynamic link in a table/list (v14) ..can't find anything in the doco

Please help

Cheers

Re: How to insert dynamic anchor/link in list/table

Posted: Fri Mar 30, 2018 6:44 am
by jyoung
Unfortunately you can't add controls to a List, but you can add a reusable part.

Create a reusable part that implements IListCellDesign

From there you can add a label to act as your link and do whatever actions you need to.

Joe

Re: How to insert dynamic anchor/link in list/table

Posted: Thu Apr 05, 2018 1:17 am
by caseywhite
You can also do it with a reusable part. You can assign a themedrawstyle that makes your text look like a hyperlink. You can then either assign that themedrawstyle to the column if every cell will be clickable or just to a specific row if only some cells will be clickable. Then use the click even of the column to capture the fact that a row was clicked in the column. Something like below. The only drawback to this approach is that if you set the cursor to change when you mouseover, if won't change. If you want the cursor to change then you will need to use the approach jyoung suggested.

Code: Select all

Evtroutine Handling(#Com_owner.Initialize)
#deptment := 'XXXXXXXXXXXX'
#deptdesc := 'X DESC'
#std_title := 'XXXXXXXXXX'
Add_Entry To_List(#List1)

#deptment := 'YYYYYYYYYYY'
#deptdesc := 'y DESC'
#std_title := 'YYYYYYYYY'
Add_Entry To_List(#List1)
#ColumnDEPTMENT1.CurrentItem.ThemeDrawStyle := 'Hyperlink'

#deptment := 'ZZZZZZZZZZ'
#deptdesc := 'z DESC'
#std_title := 'ZZZZZZZZZ'
Add_Entry To_List(#List1)
#ColumnDEPTMENT1.CurrentItem.ThemeDrawStyle := 'Hyperlink'

Endroutine

Evtroutine Handling(#ColumnDEPTMENT1.Click)
#SYS_WEB.Alert Caption(#DEPTMENT)
Endroutine