Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Question on cGrid.SetOrder()
Message
General information
Forum:
Visual FoxPro
Category:
The Mere Mortals Framework
Miscellaneous
Thread ID:
00831581
Message ID:
00978979
Views:
34
>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,

I think, some logic is really missing here. The current implementation assumes, that this grid is always used for displaying InitialSelectedAlias records, which is not always true. For instance, I am trying to use this grid to display search results in the cursor created in the business object.
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform