Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid on a Form not getting populated
Message
From
26/04/2002 10:28:22
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Grid on a Form not getting populated
Miscellaneous
Thread ID:
00649587
Message ID:
00649587
Views:
31
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
Map
View

Click here to load this message in the networking platform