Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid cell focus
Message
From
03/11/1999 01:30:49
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Miscellaneous
Thread ID:
00285933
Message ID:
00285964
Views:
15
>I can't believe that I can't figure this out, but how can I change the active cell within a grid based on a user keystroke.
>
>Specifically, I am using a grid for entering a lot of data. The user will press tab to move across a row, but when they press enter, I want to move down one row and back to the leftmost column.
>
>On key label just doesn;t seem to have access to activerow and activatecell.
>
>Thanks


For a grid that columns are not tampered with (ColumnOrders might change at runtime but no check here) this code would do what you want :
*Grid.Arcc
Lparameters nColIndex
If lastkey() = 13 and nColIndex # 1
  With This
    .ActivateCell(.relativerow+1,1)
    .Columns(1).Setfocus()
  Endwith
Endif
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform