Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Question on cGrid.SetOrder()
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
The Mere Mortals Framework
Divers
Thread ID:
00831581
Message ID:
00831836
Vues:
24
Jon,

>I have a question on the cGrid.SetOrder(), specifically its use in the cListObjEdit custom control. We use the cListObjEdit to display child records on a cBizObjMaintenanceForm form. We have code in the Header.Click() events of the grid to allow the user to change the order of the grid by calling the grid's SetOrder().
>
>The problem: cGrid.SetOrder() has a call to the form's SetFilePos() method. This, in turn, calls code in the parent bizobj to causes the record pointer to move in the parent view, not the child view. This eventually causes an error 1585 in our app because the parent view is row buffered.
>
>The question: Is the call to Thisform.SetFilePos() in cGrid.SetOrder() a mistake, or (more likely) are we missing something in our implementation?

It looks like this code is assuming the business object associated with the grid is the primary (or auto-primary) business object. The call to ThisForm.SetFilePos() is there so the form's navigation toolbar is properly refreshed. Try setting the child business object to "auto-primary" and see if that fixes the problem.

Regards,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform