Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Movement in Grid
Message
 
To
04/01/2002 17:01:59
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00601028
Message ID:
00601050
Views:
24
>Nick,
>
>RE: Moving from last column in this row to first column in next row
>
>I've continued to think about your original problem. The solution presented does what you wanted and you may not want to go into it any further. But, I was curious as to "how" to get the activatecell method to work. The code below represents what I've found. I think it does everything you want. Visually I think it looks better at runtime. Let me know what you think.
>
>
>*In BeforeRowColChange
>LPARAMETERS nColIndex
>
>nBrow=thisform.grid1.RelativeRow
>
>IF nColIndex=this.ColumnCount AND INLIST(LASTKEY(),4,9,13)
>
> thisform.grid1.ActivateCell(thisform.grid1.RelativeRow+1,1)
> NODEFAULT
> nNrow=thisform.grid1.RelativeRow
>
> IF nBrow=nNrow
> thisform.grid1.DoScroll(1)
> thisform.grid1.ActivateCell(thisform.grid1.RelativeRow+1,1)
> NODEFAULT
> ENDIF
>
>ENDIF
>
>*Greg


Hi Greg, I tried the new code (clever trick) and it works fine except that once it gets to the end of the last row and column, if keep hitting tab, it scolls the grid up. However, it won't let you click into another cell on the grid because it locked on the last row. If you hit shift tab to go back one cell then you are able to click anywhere in the grid again.

Thanks
Nick Patel
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform