Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid1
Message
De
03/05/2001 15:55:04
Jorge Haro
Independent Consultant
Juarez, Mexique
 
 
À
02/05/2001 12:07:54
Chuck Tripi
University of Wisconsin - Milwaukee
Milwaukee, Wisconsin, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Re: Grid1
Divers
Thread ID:
00502561
Message ID:
00503217
Vues:
25
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
Fil
Voir

Click here to load this message in the networking platform