Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid: Some records shouldn't be selected
Message
From
26/10/2006 06:13:51
 
 
To
26/10/2006 02:33:20
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01164272
Message ID:
01164651
Views:
10
This message has been marked as the solution to the initial question of the thread.
This all depends where your cursor is on the form when you press the keyboard (either up- or down-arrow, or a number).
I assumed you had a field on the form where you select the AC level number to go to.

If you are in the grid, and press an arrow, then the .AfterRowColChange(0 event is triggered. So, in this event you could have code similar to your example, but omit the this.AfterRowColChange()

>In what event of the Grid?
>
>
>
>do case
>   case nKeyCode =  5 && UP ARROW
>      select tbl
>      do while !bof() and ac_level != '3'
>         skip -1
>      enddo
>      >*      nodefault
>   case nKeyCode =  24 && DOWN ARROW
>      select tbl
>      do while !eof() and ac_level != '3'
>         skip 1
>      enddo
>      this.AfterRowColChange()
>*      nodefault
>endcase
>
>
>It works fine, but it skips 1 record further.
>AC_LEVEL
>1
>2
>3
>3
>if the pointer is on record 1 which is AC_LEVEL = 1 if i press DownArrow it moves to AC_LEVEL = 3 but record 4.
>Any help on this.
- Whoever said that women are the weaker sex never tried to wrest the bedclothes off one in the middle of the night
- Worry is the interest you pay, in advance, for a loan that you may never need to take out.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform