Chen,
>If I set NavControl to grdOrders. Record pointer position change in grdOrder does cause OrderDetail’s HookParentNavigated() fire and the correct order details are shown.
Right...this is exactly what I recommended
> However, the form is stuck on a single customer: now the movement of record pointer in grdCustomer does not cause the refreshment of grdOrders. In my opinion, the form is broken this way.
If I understand the scenario correctly, it sounds like when you go back to the Customer grid, you need to set it as the NavControl. If this is the case, you can create an event handler for each grid's Enter event and add code to the handler that sets the grid as the NavControl. In case you don't know how to create an event handler for this event, do the following for each grid:
1. Select the Grid in design mode
2. Go to the Properties Window and select the Events button (the one with the lightning bolt)
3. In the left column, double-click the Enter event. This adds an event handler method to the form
4. Add code to the handler method that sets the data grid as the NavControl
If the grids are on two different pages, you may want to set the grid as the NavControl in each grid's page Enter event (rather than the Enter event of the grid).
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