Information générale
Catégorie:
Gestionnaire d'écran & Écrans
Chuck, this works for me:
In the Data Environment (DE) of the form add both your person and auth tables, then set it up like this
InitialSelectedAlias = "PERSON"
Create a relation by dragging the field in person into the index in auth(main?)
The index you use is important, otherwise it will not work correctly, for example usually you set up relations with something like
Person.PersonID -> Auth.PersonID
where personid is a primary or candidate key in person and a foreign key in auth.
Anyway, at this point the automatic positioning of the auth pointer should work.
Now for the Grid:
The hard way:
RecordSource: Auth
ChildOrder: Leave blank (Set it up in the DE)
ColumnCount : 4
LinkMaster: Leave Blank (Again the DE takes care of this)
Readonly: Whatever you need
Recourdource type: 1-Alias
RelationalExpr: None ( DE takes care of it also )
Now you have to set up the control source for each column like Hector told you:
Grid1.Column1.Controlsource = auth.organization
and so on ...
Easy way #1
Right click the grid and choose Builder, you'll be presented with a Wizard to set up your grid
Easy way #2
Drag your auth (from the title of the cursor object) table from the Data Environment to your form, a grid will be added with all the fields of the table, you can delete the coumns you don't need, and change the captions to whatever you want.
>VFP 6.0
>
>Grid: Grid1
>ChildOrder: main
>LinkMaster: person
>ReadOnly: .T. - True
>RecordSource: auth.organization, auth.authtype, auth.effective, auth.end
>RecordSourceType: 1 - Alias
>RelationExpr: id
>
>How can I specify what fields to show in the gird (ColumnCount: -1), since the rest of the fields would be above it in all the textboxes for add/editing.
>
>Chuck
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