General information
Category:
Forms & Form designer
Title:
Grid on a Form not getting populated
I am working on a VFP 5.0 application, and have the following code:
On the Grid1.Init procedure, I create my columns:
THISform.gridbase1.ADDCOLUMN(1)
THISform.gridbase1.COLUMNS(1).NAME = 'requirement'
THISFORM.GRIDbase1.REQuirement.WIDTH = 240
THISform.gridbase1.REQuirement.HEADER1.CAPTION = 'Requirement'
THISform.gridbase1.REQuirement.HEADER1.ALIGNMENT = 2
THISform.gridbase1.ADDCOLUMN(2)
THISform.gridbase1.COLUMNS(2).NAME = 'Box'
THISFORM.GRIDbase1.box.WIDTH = 30
THISform.gridbase1.box.HEADER1.CAPTION = ''
THISform.gridbase1.box.HEADER1.ALIGNMENT = 2
Then, on the form.init, I attempt to populate the grid with info from a text file:
CREATE cursor importfile (field c(30))
SELECT importfile
APPEND from lcImportPath + aFile(1,1) type sdf
SELECT field ;
FROM importfile;
INTO table oapp.lctemp+'importfiletable.dbf'
thisform.gridbase1.Requirement.ControlSource = 'importfiletable.field'
thisform.refresh()
My grid never gets the data! I know that I must be missing something minor because I've done this type of thing before and it's worked. But I've compared my new code to the older stuff, and I don't see anything obviously different.
Any ideas would be GREATLY appreciated...
Thanks,
Joe
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only