Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
A reference to the current column in a grid
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00147795
Message ID:
00147884
Views:
30
>Jim:
>
>>
>>lcColumn = THISFORM.Grid1.Columns(THISFORM.Grid1.ActiveColumn).Name
>
>Ok, no syntax error now but back to the original problem.
>If you do your instruction when in the 2nd column of the grid you'll get Column2, if you swap positions of column 2 and 3, and positioned in the 2nd column excecute your instruction you'll get Column2, instead of Column3 as desired.
>I solved my situation with a workaround but still wondering how to get the reference of the selected column in a grid?

Jorge,

What was your work around?

Whats happening is that in the columns collection they don't change positions so 2 is always 2 even if 3 gets moved before it. One thing you can do is in the afterrowcol change you can record the name of the current column to a property of the grid and then use that property.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform