How to keep row position
Posted: Mon Jan 18, 2021 1:33 pm
Hi,
When the UPD_ENTRY command is used to a list which is sorted, the position of the updated row changes.
Is there a way to keep the position of the row?
This is a sample code.
Best regards,
Taku Izumi
When the UPD_ENTRY command is used to a list which is sorted, the position of the updated row changes.
Is there a way to keep the position of the row?
This is a sample code.
Code: Select all
Begin_Com Role(*EXTENDS #PRIM_WEB) Theme(#SYS_THEME<MaterialDesignBlue>)
Define_Com Class(#PRIM_LIST) Name(#List1) Displayposition(1) Left(24) Parent(#COM_OWNER) Tabposition(1) Top(32) Height(486) Width(841)
Define_Com Class(#PRIM_LIST.String) Name(#ColumnSTD_STRNG1) Columnwidth(576) Displayposition(2) Parent(#List1) Source(#STD_STRNG) Sortonclick(True)
Define_Com Class(#PRIM_LIST.Number) Name(#ColumnSTD_NUM1) Columnwidth(90) Displayposition(3) Parent(#List1) Source(#STD_NUM) Columnreadonly(False)
Define_Com Class(#PRIM_LIST.Number) Name(#ColumnSTD_INT1) Columnwidth(105) Displayposition(4) Parent(#List1) Source(#STD_INT)
Define_Com Class(#PRIM_LIST.String) Name(#List1Column1) Columnwidth(39) Displayposition(1) Parent(#List1) Sortonclick(True) Source(#STD_ALPHA)
Define Field(#WRK_NUM) Reffld(#STD_NUM)
Evtroutine Handling(#Com_owner.Initialize)
#STD_STRNG := 'A'
Begin_Loop Using(#WRK_NUM) To(5)
#STD_ALPHA := #WRK_NUM.AsString
Add_Entry To_List(#List1)
End_Loop
Endroutine
Evtroutine Handling(#List1.ItemChanged)
#STD_INT := #STD_NUM * 10
Upd_Entry In_List(#List1)
Endroutine
End_Com
Taku Izumi