VL-WEB What column clicked in list?
VL-WEB What column clicked in list?
I have a Fedex/UPS tracking# as one column in a #PRIM_LIST. If the user clicks on the row, I need to do one thing. But if they click on the tracking#, I need to load the specific shippers website.
How do I know what column they clicked on?
I thought I saw this but haven't found it.
How do I know what column they clicked on?
I thought I saw this but haven't found it.
Art Tostaine
-
davidbalansa
- Posts: 92
- Joined: Mon Feb 01, 2016 10:08 am
Re: VL-WEB What column clicked in list?
Hi Art,
The column has a click event.
Evtroutine Handling(#ListColumn.Click)
...
endroutine
David
The column has a click event.
Evtroutine Handling(#ListColumn.Click)
...
endroutine
David
Re: VL-WEB What column clicked in list?
Thanks for the quick reply!
I've been testing that event and it looks like it only fires when I click on the column heading. That would mean the user would have to click on the row and then the column heading.
I have this code to test:
I've been testing that event and it looks like it only fires when I click on the column heading. That would mean the user would have to click on the row and then the column heading.
I have this code to test:
The popup shows when I click the column heading:EVTROUTINE HANDLING(#List1Column4.ColumnClick)
#label1.caption := 'columnClick'
#Popup1.ShowPopup
ENDROUTINE
Art Tostaine
-
davidbalansa
- Posts: 92
- Joined: Mon Feb 01, 2016 10:08 am
Re: VL-WEB What column clicked in list?
I am using it on a #prim_list in VL Web without issue.
Re: VL-WEB What column clicked in list?
That's interesting.
I've had to use a custom control for this.
The docs here https://docs.lansa.com/14/en/lansa016/p ... column.htm don't show a "Click" event only a "ColumnClick". HOWEVER, the EXAMPLE does.
I've had to do some trickery where I put a custom control on the list, establish a dynamic reference to that control on the view and then on the List's ItemGotFocus set the reference in the view so that I could pick up the control's click event.
I don't have the specific code that does this at the moment, but I will try to dig it up.
Joe
I've had to use a custom control for this.
The docs here https://docs.lansa.com/14/en/lansa016/p ... column.htm don't show a "Click" event only a "ColumnClick". HOWEVER, the EXAMPLE does.
I've had to do some trickery where I put a custom control on the list, establish a dynamic reference to that control on the view and then on the List's ItemGotFocus set the reference in the view so that I could pick up the control's click event.
I don't have the specific code that does this at the moment, but I will try to dig it up.
Joe
Re: VL-WEB What column clicked in list?
That was the way we had to do it in VL-WIN V13. We grabbed the RP in the row when it was clicked.
I don't want to do that now
I could change to a right click but yuck
I don't want to do that now
I could change to a right click but yuck
Art Tostaine
Re: VL-WEB What column clicked in list?
I just threw this together
Sure enough, there is a click event now!
Code: Select all
begin_com role(*EXTENDS #PRIM_WEB) Theme(#SYS_THEME<MaterialDesignBlue>)
define_com class(#PRIM_LIST) name(#List) ColumnHeaderHeight(48) ColumnLines(False) DisplayPosition(1) Height(360) Left(311) Parent(#COM_OWNER) RowHeight(48) TabPosition(1) Top(67) Width(500)
define_com class(#PRIM_LIST.String) name(#ListColumn1) ColumnWidth(246) DisplayPosition(1) Parent(#List) SortOnClick(True) Source(#STD_TEXTS)
define_com class(#PRIM_LIST.Label) name(#ListColumn2) Caption('PRIMARY') CaptionAlignment(Center) CellSizing(None) CellThemeDrawStyle('MediumTitle') DisplayPosition(2) Parent(#List)
evtroutine handling(#Com_owner.Initialize)
endroutine
evtroutine handling(#ListColumn2.Click)
endroutine
end_com
Last edited by jyoung on Thu Nov 14, 2019 9:02 am, edited 1 time in total.
Re: VL-WEB What column clicked in list?
dammit. I was using columnclick. David is using click.. I'll use it THANKS
Art Tostaine
Re: VL-WEB What column clicked in list?
I remember having this exact issue and there not being (or not finding) a "Click" event for the column.
That would have made some things a heck of a lot easier.
Good to know for future work.
That would have made some things a heck of a lot easier.
Good to know for future work.
-
davidbalansa
- Posts: 92
- Joined: Mon Feb 01, 2016 10:08 am
Re: VL-WEB What column clicked in list?
Sorry Art,
I completely missed you specifying the ColumnClick event instead of Click event.
David
I completely missed you specifying the ColumnClick event instead of Click event.
David