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