Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Iterating through columns in a grid
Message
 
 
To
28/06/2001 11:24:42
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00524428
Message ID:
00524791
Views:
17
Rich,

When I saw your message yesterday, I wanted to give this reply, but got blank window instead (e.g. was unable to save my response) :) Glad, you find out this by yourself :)

>Your comment about needing to use a collection pointed me elsewhere
>
>
>Thisform.grdQueue.Columns(tnColNumber).Header1.FontBold = .T.
>
>
>I've now played with both versions enough that I think I'll remember it the next time I need it.
>
>Thank you very much.............Rich
>
>
>>You need to specify an array or a collections, in your case it is Columns as below:
>>
>>
>>LPARAMETERS tnColNumber
>>
>>FOR EACH oColumn IN Thisform.grdQueue.Columns
>>  IF oColumn.ColumnOrder = tnColNumber
>>    oColumn.Header1.FontBold = .T.
>>  ENDIF
>>ENDFOR
>>
>>
>>
>>
>>>This is my first attempt to work with grids so please bear with me.
>>>
>>>I want to create a little method which will (for example) boldface the header on a particular column
>>>
>>>
>>>LPARAMETERS tnColNumber
>>>
>>>FOR EACH oColumn IN Thisform.grdQueue
>>>  IF oColumn.ColumnOrder = tnColNumber
>>>    oColumn.Header1.FontBold = .T.
>>>  ENDIF
>>>ENDFOR
>>>
>>>
>>>This generates an error "GRDQUEUE cannot be enumerated"
>>>
>>>Could someone post a sample of the proper way to cycle through the columns of a grid???
>>>
>>>Thanks to all........Rich
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform