I've a cWebList. It's data-aware but I want it sorted by a particular column for which there's no suitable index. However, I know the number of rows will always be reasonably small. So, I've set peDbGridType to gtAllData so that I can set the piSortColumn to be the column I want the list to be sorted by.

Now, this is fine and it sorts correctly. But, when the data is paged, the current/highlighted row is being determined by whatever was the top row before the sort column re-order kicked in. In other words, it's the first row according to the index by which the data was found.

You can see this easily enough in the SelectOrder.wo :

Code:
Object oList is a cWebList
    Set pbFillHeight to True
    Set piColumnSpan to 0
    Set pbServerOnRowClick to True
    Set psCSSClass to "MobileList"
    Set pbReverseOrdering to True
    Set pbShowHeader to False
    Set psPlaceHolder to "No orders"
        
    Set peDbGridType to gtAllData
    Set piSortColumn to 2
When you go into a customer's orders, they will all be loaded and sorted according to OrderHeader.Order_Total (this is Column Index 2) but the highlighted row won't always be the top row.

So my questions are:

1. How does one make the top row the initial highlighted row in an example like this?

And, if it means calling a method to control this..

2. What method and when/where is the right place to call it? For example, I'm mindful that according to the help MoveToFirstRow should not be used with Data Aware lists. But even if this was the correct method to call, there is no suitable "all data has loaded" event to hook into.