TXBrowse - Refresh() - Some Issues
Posted: Sat Jan 12, 2008 3:20 am
When a field of the current row in the active index is modified, if the new OrdKeyNo() is less than the oBrw:nRowSel, the browse display is incorrect even after oBrw:Refresh().
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?
This modification resolves this issue totally for every kind of data source.
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
Instead of the present
::nRowSel := Min(::nRowSel, ::nLen)
Substitute:
::nRowSel := Min(::nRowSel, eval( ::bKeyNo ) )