Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Displaying child records in a particular order in grid
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
CodeMine
Divers
Thread ID:
00559705
Message ID:
00559721
Vues:
10
>The parameters for the grid show a ChildOrder=None. If I enter the order that I want, i.e. the date field, I generate a CM error 1098 "LinkMaster,ChildOrder, and RelationalExpr properties must all be empty unless cWorkArea is set to .NULL."

To get the grid to display the child data, the child data table has its tag order set to the appropriate foreign key (that matches the primary key of the parent table). This groups the child records in the grid (by using a SET KEY TO command) to the parent's PK but will not necessarilly give you the order you want within the child data.

The best way to do this is to have your child data in a view. The view SQL-Select query can set the specific order of the child record (ORDER BY clause). Set the view's NoDataOnLoad property to .F. - open it (USE), the view in the form's load method and create the index in the load method on the empty view and requery the view later (and when the record in the parent cursor moves). You could also use the SET RELATION command in their, or call the data manager to establish the relation ship between the unmanaged child view and its parent cursor.

>
>I checked out the CM data manager, since this is what is managing the data in the first place, but wasn't able to immediately see any parameter that would control the display of child records.
>
>-- Larry
-=Gary
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform