Page 1 of 1

#PRIM_LIST.DropdownColumn behavior is strange

Posted: Tue Jan 25, 2022 12:51 pm
by Yukiko Ikeo
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

Re: #PRIM_LIST.DropdownColumn behavior is strange

Posted: Wed Jan 26, 2022 1:38 am
by Dino
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

Re: #PRIM_LIST.DropdownColumn behavior is strange

Posted: Thu Jan 27, 2022 11:12 am
by Yukiko Ikeo
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