I assume this does not require any examples, because this must be of common experience or can be easily comprehended.
The work around is
if ( n := OrdkeyNo() ) < oBrw:nRowSel
oBrw:nRowSel := n
oBrw:Refresh()
endif
But programmers who face this situation for the first time should learn this work around either by trial and error or from some posting in these forums. Instead why can not the Refresh method be modified slightly?
- Code: Select all Expand view RUN
Instead of the present
::nRowSel := Min(::nRowSel, ::nLen)
Substitute:
::nRowSel := Min(::nRowSel, eval( ::bKeyNo ) )
This modification resolves this issue totally for every kind of data source.