>The problem maybe that the Column.ControlSource is set to wtkgs in the building code and then I have to set it to "" in the Init of the txtGridWtLbs control :
>
>* * txtGridWtLBS : init : 14:50 Wednesday 01/29/2003"
>local oColumn
>oColumn = this.Parent
>this.cControlSource = this.controlsource
>oColumn.Bound = .f.
>oColumn.ControlSource = ""
>this.controlsource = ""
>oColumn.Sparse = .f.
>cControlRef = "this." + oColumn.Name + "." + this.Name + ".cal_lbs()"
>oColumn.DynamicCurrentControl = cControlRef
>this.ToolTipText = "Weight in " + this.cKgLbs
>
>
>Also as you can see my cal_lbs (your calpounds) has to be a method in the txtGridWtLbs control for reasons of encapsulation.
>
>I do not know exactly what is the problem. Any further ideas would help.
Why is the code in the init of the textbox? Seems to be a little too early to set column's properties - if memory serves me, contained objects in VFP are created (and their .init stuff run) before the containing objects, so the code in the textbox.init should run before the .column.init, and before the grid.init.
One thing I've learned about manipulating grids is that any custom setup code should come later - in grid.init. Maybe I'm wrong, but you may try to move the code there and see if it behaves better. Of course, keep track of it in the debugger, just like Nick said. I've learned more about grids from the debugger than from books and help combined.