Firebug does not show any errors. In the .Load of the form I open the table and set the order. I set the order again in the .Init of the form and do a refresh. The grid has the data sources set at design time.
What happens is
1. The form is opened from a menu "IntuiCat.FormDisplay(event, 'sar_clst_web.scx', '.t.')".
2. The form opens normally.
3. The xml file is created with the table in natural order, not indexed order. I think it is supposed to do that?
4. The VFP form in debug displays correctly.
5. The connection between the grid and the underlying record number is actually still working. If I select the fifth rows of the grid, I get the VFP data from the fifth indexed record. However since the display is all wrong, to the user the data on the fifth record appears as the fifth record in natural order, since that is what the XML file has.
6. If I call a childform and open it, then click back to the orginal form with the grid, when the form gets the focus the display is correct. I do not have enough forms to confirm, but it actually seems that as soon as the form with the grid loses focus the display becomes correct.