Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Columns & headers
Message
 
To
16/12/1996 09:57:36
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00015197
Message ID:
00015208
Views:
28
>How can I programmatically create an array with the names of the columns in a grid. And can I use a method or property per grid to contain this array.
>
>Michel
Hi Michel,

You can add the array as property to your base grid class,
and then fill it like:
dimension thisform.mygrid.aNames(thisform.mygrid.ColumnCount)
for i=1 to thisform.mygrid.ColumnCount
thisform.mygrid.aNames(i)=thisform.mygrid.columns(i).name
endfor
But maybe you don't need the array, because you always can get the
column name by something like:
_screen.activeform.mygrid1.columns(3).name

Nick
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform