Ok, grids are not behaving as I would expect.
Grid1 (2 columns)
Group Code ... Group Name
Grid2 (3 columns)
Group Code ... Individual Code ... Individual Name
The 2 tables do not use SET RELATION. I tried that at first but only one row would show in Grid1, so I removed it.
I allow the user to select a different index for each of the 3 lower columns, all they have to do is click the column header. That code to change the index is in the Column's header Click code. The code to sync Grid1 to changes in grid2 is in the grid's AfterRowColChange method.
It works fine for the 2 leftmost columns, Group Code and Individual Code. But the problem arises when a user clicks on the Individual Name column. The index is set and the grid2 refresh is called as happens on all 3 columns' code, but somewhere between that call to grid.Refresh and AfterRowColChange opens, the table record pointer changes to one at the top of the grid2 and I don't know why. There's even two arrows on the grid while inside AfterRowColChange.
I guess I'll have to debug some more. Let me know if I'm using the wrong events or methods to do what I'm trying to do...
Grid1 (2 columns)
Group Code ... Group Name
Grid2 (3 columns)
Group Code ... Individual Code ... Individual Name
The 2 tables do not use SET RELATION. I tried that at first but only one row would show in Grid1, so I removed it.
I allow the user to select a different index for each of the 3 lower columns, all they have to do is click the column header. That code to change the index is in the Column's header Click code. The code to sync Grid1 to changes in grid2 is in the grid's AfterRowColChange method.
It works fine for the 2 leftmost columns, Group Code and Individual Code. But the problem arises when a user clicks on the Individual Name column. The index is set and the grid2 refresh is called as happens on all 3 columns' code, but somewhere between that call to grid.Refresh and AfterRowColChange opens, the table record pointer changes to one at the top of the grid2 and I don't know why. There's even two arrows on the grid while inside AfterRowColChange.
I guess I'll have to debug some more. Let me know if I'm using the wrong events or methods to do what I'm trying to do...