Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Creating grid on the fly, some of the columns aren't correct
Message
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Creating grid on the fly, some of the columns aren't correct
Miscellaneous
Thread ID:
00325088
Message ID:
00325088
Views:
55
I am creating a grid to display the contents of a cursor. Only the first 5 columns of the grid have a proper caption and are bound to the cursor. If I look at the grid in the debugger, all the captions and controlsource are set correctly, but the grid does not display either the captions or data after the 5th column. Can anyone see the flaw in my technique?
THIS.RECORDSOURCE = "cCovering"
this.addobject('cName','column') 
this.cName.controlsource = "cCovering.name"
this.cName.header1.caption= "Name"
this.cName.width = 120

this.addobject('cOrd','column') 
this.cName.controlsource = "cCovering.ord"
this.cOrd.header1.caption= "Order"
this.cOrd.width = 40
 
* add on and configure all day columns
FOR nColumn = 3 to (lnDays + 2)
	cColumn = alltrim(str(nColumn - 2))
	this.addobject('cDay'+cColumn,'column')
	this.columns(nColumn).header1.caption = cColumn
	this.columns(nColumn).width = 70
	this.columns(nColumn).controlsource = 'cCovering.Day'+cColumn
ENDFOR

THIS.refresh  && refresh the grid
Next
Reply
Map
View

Click here to load this message in the networking platform