Page 1 of 1

Navigating a BROWSE

Posted: Tue Mar 17, 2009 4:38 am
by CCH4CLIPPER
Hi All

Take a look at this function :-

Function BrMove(met)
do case
case met == 1
dbGotop()
_GridHome ( "Browse_1",thiswindow.name )
case met == 2
_GridPgUp ( "Browse_1",thiswindow.name )
case met == 3
dbSkip(-1)
_GridPrior( "Browse_1",thiswindow.name )
case met == 4
dbSkip(1)
_GridNext ( "Browse_1",thiswindow.name )
case met == 5
_GridPgDn ( "Browse_1",thiswindow.name )
case met == 6
dbGoBottom()
_GridEnd ( "Browse_1",thiswindow.name )
endcase

Problems
1. For case met == 6, it will not go to the last record but instead it will stop at the last record within the visible Browse
Assuming Table has a 100 records and Browse shows say 30 records, I expect it to go to record 100. Instead it stops at Record 20

2. For case met == 5, it will not go to the next page but instead it will stop at the last record within the visible Browse
Assuming Table has a 100 records and Browse shows say 30 records, I expect the Browse to show records 31 to 60. Instead
Instead it stops at Record 20

3. For case met == 4, if cursor is at say Record 20, this will stay at Record 20


Q. What must I do to get the Browse to behave as expected ?


TIA

CCH
http://cch4clipper.blogspot.com

Re: Navigating a BROWSE

Posted: Wed Mar 18, 2009 6:34 am
by mol
CCH4CLIPPER wrote:Hi All


case met == 6
dbGoBottom()
_GridEnd ( "Browse_1",thiswindow.name )
endcase

Problems
1. For case met == 6, it will not go to the last record but instead it will stop at the last record within the visible Browse
Assuming Table has a 100 records and Browse shows say 30 records, I expect it to go to record 100. Instead it stops at Record 20
About met ==6 try this sequence, if it satisfying for you:

dbGoBottom()
SetProperty(thisWindow.name,"Browse_1","Value", recno() )


It will move pointe of Browse to last record

regards, Marek

Re: Navigating a BROWSE

Posted: Wed Mar 18, 2009 6:52 am
by sudip
Hi CCH,

Have you given the command at first :

SET BROWSESYNC ON

Regards.

Sudip

Re: Navigating a BROWSE

Posted: Wed Mar 18, 2009 1:56 pm
by CCH4CLIPPER
Hi Sudip

Yes, I have SET BROWSESYN ON...


CCH
http://cch4clipper.blogspot.com

Re: Navigating a BROWSE

Posted: Wed Mar 18, 2009 2:07 pm
by CCH4CLIPPER
Hi Marek

Hip ! Hip ! Hooray !

SetProperty(thisWindow.name,"Browse_1","Value", recno() ) works perfectly !

BTW, I had somehow expected you to give the right advice :-)

TQVM

CCH
http://cch4clipper.blogspot.com

Re: Navigating a BROWSE

Posted: Thu Mar 19, 2009 6:26 am
by mol
I knew that works good, because I use it in my program...