Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Moving to next row in a Grid
Message
 
To
16/08/1998 19:07:18
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00127246
Message ID:
00127262
Views:
33
>>Alternatively, you can set focus to the correct row/column instead of using >the arrow keys.
>
>How would I address the row/colunm in a grid?
>
>Thanks Again

If you need to track the row or column, add one or two properties to your form which hold 'lastgridrow' and 'lastgridcol'. In the grid's AfterRowColChange code, check the present row (or record number, which is easier) against the stored row/recno(). If it's changed, you've moved rows.

In your case, I'm not sure whether you wanted to move to the next column (so you'd use a right-arrow) or to the next row (keyboard a down arrow).

Finally, if you need to refer to the specific column, you can use the hierarchical relationship. If your code is in a method for a grid textbox, then any other specific textbox would be:

THIS.parent.parent.columnN.text1

Note that you work your way from textbox to column to grid (two 'parent' levels) and then back down the new column

HTH
Barbara
Barbara Paltiel, Paltiel Inc.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform