Prim_List Column events

This Q&A forum allows users to post and respond to "How Do I Do ....." questions. Please do not use to report (suspected) errors - you must use your regional help desk for this. The information contained in this forum has not been validated by LANSA and, as such, LANSA cannot guarantee the accuracy of the information.
Post Reply
atostaine
Posts: 696
Joined: Wed Jan 20, 2016 7:38 am

Prim_List Column events

Post by atostaine »

I have a PRIM_LIST.Number and I don't see changed or lostfocus.

The list entry has qty, unit of measure, price, total. I would like to recalculate anytime any of those fields are changed. I normally use gotfocus and lostfocus instead of changed because I don't need to calculate on every key stroke.
available events
available events
item.png (5.15 KiB) Viewed 4528 times
Thanks, Art
Art Tostaine
User avatar
Stewart Marshall
Posts: 417
Joined: Thu Nov 05, 2015 5:25 pm

Re: Prim_List Column events

Post by Stewart Marshall »

Hi Art

Focus events belong to the list as a whole rather than individual columns.

Changed processing is at item level.

Regards

Code: Select all

Begin_Com Role(*EXTENDS #PRIM_WEB) Height(465) Width(857)
Define_Com Class(#PRIM_LIST) Name(#List1) DisplayPosition(1) Left(16) Parent(#COM_OWNER) TabPosition(1) Top(7) Height(442) Width(825)
Define_Com Class(#PRIM_LIST.Number) Name(#ColumnSTD_PRICE1) ColumnWidth(102) DisplayPosition(1) Increment(1) Parent(#List1) Source(#STD_PRICE) Wrap(False) ColumnReadOnly(False)
Define_Com Class(#PRIM_LIST.Number) Name(#ColumnSTD_COUNT1) ColumnWidth(101) DisplayPosition(2) Increment(1) Parent(#List1) Source(#STD_COUNT) Wrap(False) ColumnReadOnly(False)
Define_Com Class(#PRIM_LIST.Number) Name(#ColumnSTD_AMNT1) ColumnWidth(122) DisplayPosition(3) Increment(1) Parent(#List1) Source(#STD_AMNT) Wrap(False)

Evtroutine Handling(#COm_owner.CreateInstance)
Inz_List Named(#List1) Num_Entrys(10)
Endroutine

Evtroutine Handling(#List1.ItemChanged)

#Std_amnt := #Std_price * #Std_count
Upd_Entry In_List(#List1)

Endroutine

*Evtroutine Handling(#List1.ItemLostFocus)

*#std_amnt := #Std_price * #std_count
*Upd_Entry In_List(#List1)

*Endroutine

End_Com
Stewart Marshall

Independent IT Consultant
www.marshallfloyd.com.au
Post Reply