Hi,
when working with lists containing a lot of rows our customer wants to have the possibility to position the list by selecting e.g. a customer number.
After typing in a customer number the row of thís customer shall be displayed as first row in the display (without again reading or sorting the list).
So we make a SELECTLIST and when getting to the entry with the given customer number we set:
#List1.CurrentItem.Focus := True
But now - depending on the momentarily shown lsit rows - the row with the selected customer is displayed as first or last row or something in between.
What do we have to do to get this selected row always displayed as the first one?
Best regards,
Joerg
Web Page - List - controlling the display of list rows
-
Joerg Hamacher
- Posts: 124
- Joined: Thu Feb 11, 2016 12:01 am
-
caseywhite
- Posts: 192
- Joined: Thu May 26, 2016 1:17 am
Re: Web Page - List - controlling the display of list rows
This should do what you want. Keep in mind that if the entry is near the bottom of the list, "Top" will not put it at the very top of the list if there aren't enough entries below it.
Code: Select all
Selectlist Named(#List1)
If Cond(#YOURFIELD = YOURVALUE)
#List1.VerticalScrollTo Item(#LiST1.CurrentItem) Scrollposition(Top)
Leave
Endif
Endselect
Re: Web Page - List - controlling the display of list rows
That's pretty cool Casey.
Art
Art
Art Tostaine
-
Joerg Hamacher
- Posts: 124
- Joined: Thu Feb 11, 2016 12:01 am
Re: Web Page - List - controlling the display of list rows
That's great - thank you very much, Casey.
Have a nice weekend,
Joerg
Have a nice weekend,
Joerg