I have following code:
selectAccountInCode = True
AccountsListBox.SelectedRowIndex = -1
For j As Integer = 0 To AccountsListBox.RowCount - 1
Var vAccountId As New NumberField(True,0)
vAccountId.Set ReadAccountID(j)
If vAccountId = mCurrentAccountRow.account_id.getDouble Then
selectAccountInCode = True
AccountsListBox.SelectedRowIndex = j
AccountsListBox.ScrollTo(j)
Exit For
End If
Next
selectAccountInCode = False
It is supposed to find row in the list, select row and scroll the list to show selected row.
The AccountsListBox is using DataSource, there may be large data sets involved like several thousand rows.
I don’t see the list scrolled automatically even though the row is selected (which I can see when resorting and/or scrolling “by hand”).
Is there something wrong with the code?
or
Is it because ScrollTo doesn’t work with WebListBox using DataSource?