Information générale
Catégorie:
Gestionnaire d'écran & Écrans
>>A form I have has 'somefile.dbf' in its data env. but under the properties section there is no mention of a rowsource etc.
>>I want this form to accomadate files of different names but same structures.
This is actually very simple to accomplish. The difficulty you may have is that you cannot define a recordsource for your grid in your form layout because the recordsource may not exist when the form is called. You will have to pass the recordsource name to the init method and set it there. You will also have to set the controlsource information. Something like this:
WITH this.grid
.setall("FontSize", 8, "Column")
.setall("DynamicBackColor", "iif(!c_grid.cursordata,rgb(255,255,255),rgb(255,0,0))", "Column")
.setall("DynamicForeColor", "iif(!c_grid.cursordata,rgb(0,0,0),rgb(255,255,255))", "Column")
.recordsource = 'c_grid'
.column1.controlsource = 'c_grid.cdisplay'
.column2.controlsource = 'c_grid.effectivedate'
.column3.controlsource = 'c_grid.cexpirydate'
.column4.controlsource = 'c_grid.createddate'
ENDWITH
Précédent
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