I have a container class that contains a grid. The grid was setup to have
specific column names. I set the grid to point to a cursor during runtime.
This allows me the ability to have multiple instances of the container using
different cursors. The container is loaded onto a form at runtime as the
user needs this interface. The code below is my standard way of "binding"
the data to the grid.
cTempFile1 = "somecursor"
this.Grid_Codes.recordsource = 1 && Alias
this.Grid_Codes.recordsource = cTempFile1
this.Grid_Codes.col_code.controlsource = cTempFile1 + ".cCode"
this.Grid_Codes.col_desc.controlsource = cTempFile1 + ".cDesc"
The problem I am having is, sometimes (hard to repeat), I get errors because
the code is referring to the col_code column. VFP errors out stating
"Unknown member COL_CODE".
It turns out, that the grid has lost the names of the grid, and now has the
names Column1 and Column2 instead of col_code and col_desc.
Has anyone else seen this problem, and does anyone have a resolution?
Thanks,
Dan Tallent