#PRIM_LIST.DropdownColumn behavior is strange

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
Yukiko Ikeo
Posts: 17
Joined: Fri Jun 09, 2017 11:58 pm

#PRIM_LIST.DropdownColumn behavior is strange

Post by Yukiko Ikeo » Tue Jan 25, 2022 12:51 pm

Hi all,

Our customer is using dropdown in the list and noticed the strange behavior.
After selecting an item in the dropdown, the selected value is not displayed immediately.
If they click outside the cell, then it's displayed.

Code: Select all

Begin_Com Role(*EXTENDS #PRIM_WEB) Theme(#SYS_THEME<MaterialDesignBlue>) Layoutmanager(#Layout1)

Define_Com Class(#PRIM_TBLO) Name(#Layout1)
Define_Com Class(#PRIM_TBLO.Row) Name(#Layout1Row1) Displayposition(1) Parent(#Layout1)
Define_Com Class(#PRIM_TBLO.Column) Name(#Layout1Column1) Displayposition(1) Parent(#Layout1)
Define_Com Class(#PRIM_TBLO.Item) Name(#Layout1Item1) Alignment(TopLeft) Column(#Layout1Column1) Manage(#List) Parent(#Layout1) Row(#Layout1Row1) Marginbottom(10) Marginleft(10) Marginright(10) Margintop(10)

Define_Com Class(#PRIM_LIST) Name(#List) Columnheaderheight(48) Columnlines(False) Displayposition(1) Height(780) Parent(#COM_OWNER) Rowheight(48) Tabposition(1) Width(1180)
Define_Com Class(#PRIM_LIST.String) Name(#ListColumn1) Columnwidth(250) Displayposition(1) Parent(#List) Sortonclick(True) Source(#STD_STRNG)
Define_Com Class(#PRIM_LIST.DropdownColumn) Name(#ListColumn2) Columnwidth(250) Displayposition(2) Parent(#List) Sortonclick(True) Columnreadonly(False)

Evtroutine Handling(#Com_owner.Initialize)
#ListColumn2.DropdownItems.Add( "1", "TEST1" )
#ListColumn2.DropdownItems.Add( "2", "TEST2" )
#ListColumn2.DropdownItems.Add( "3", "TEST3" )

#STD_STRNG := "TEST"
Inz_List Named(#List) Num_Entrys(10)
Endroutine

End_Com

It's recognized as the defect by support team, but workaround is not provided.
Can anyone find the workaround by some coding?

Thanks in advance,
Best regards, Yukiko Ikeo

User avatar
Dino
Posts: 236
Joined: Fri Jul 19, 2019 7:49 am
Location: Robbinsville, NC
Contact:

Re: #PRIM_LIST.DropdownColumn behavior is strange

Post by Dino » Wed Jan 26, 2022 1:38 am

I know this is an awful workaround, but I added an extra column, set it to ColumnReadOnly(False) and ColumnVisible(False), for the event of itemchanged, I changed the focus to that other column to force the column2 to show their value. Seems that it only display their value when you move the focus out of the input enable column to another input enable column. You should continue working with support on the fix for this.

Code: Select all

Define_Com Class(#PRIM_LIST.String) Name(#ListDummyColumn3) ColumnCaptionAlign(Left) DisplayPosition(3) Parent(#List) ColumnReadOnly(False) ColumnVisible(False)

.....

Evtroutine Handling(#List.ItemChanged)
#ListDummyColumn3.CurrentItem.SetFocus
Endroutine
End_Com

Yukiko Ikeo
Posts: 17
Joined: Fri Jun 09, 2017 11:58 pm

Re: #PRIM_LIST.DropdownColumn behavior is strange

Post by Yukiko Ikeo » Thu Jan 27, 2022 11:12 am

Hi Dino,

Thank you for your reply.
It works as expected :D
I'll tell the customer this workaround.
Also I'll continue working with support.

Thank you for your help.
Best regards, Yukik Ikeo

Post Reply