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:23:46
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00127246
Message ID:
00127265
Views:
38
>>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.
>
>I am not sure yet how I would reference the row/column in a grid.
>
>I have a grid Grid1 with 5 columns. What is the syntax to assign the value from the second row and the fourth column to a variable?
>
>Thanks

Check out Myform.Mygrid.ActiveCell(2,4) -- specifically the ActiveCell() value.

If you are IN the second row/fourth column (this is the active cell) then it is simply MyVar = THIS.VALUE

If you are in another column but on the same ROW, then you would use my syntax from the earlier message: This.parent.parent.column4.text1.value

If you don't know WHERE you are, then you might want to re-think the program and require the user to point to the row. You CAN use activerow and activecolumn as your reference points. Check them out in the Help system.

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

Click here to load this message in the networking platform