Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Iterate through Grid Header Controls
Message
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01367063
Message ID:
01367076
Views:
9
This message has been marked as the solution to the initial question of the thread.
>I am having trouble iterating through the Header controls on a Grid. I need to loop through these Header controls in order to fill in the Caption property. I looked at some iterations here in UT and don't see anything similar in concept.

I put a custom menthod in my base grid class where I just create a string (lcHeader) separated by * and the following populates the caption properties.
*following give example of assigning Header captions in grid using * as separator
	lcHeader = '*Column 1 Name*Column 2 Name*Column 3 Name*'
	this.ColumnCount = 3

	FOR ix = 1 TO this.ColumnCount 
		lcIx = ALLTRIM(STR(ix))
		this.column&lcix..header1.Caption = ;
		SUBSTR(lcHeader,AT_c('*',lcheader,ix)+1,AT_c('*',lcheader,ix+1)-AT_c('*',lcheader,ix)-1)
	ENDFOR
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform