Information générale
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
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
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement