>I have a txtDate control that works fine when I drop it into a form, but if I drop it into a column of a grid it causes "illegal operation" during init() and drops me out of VFP5.0.
>
>txtDate.Format='D'
>grid.Col2.Format='D'
>grid.Col2.Bound = .t.
>grid.Col2.ControlSource=v_services.cs_date (view, type='D')
>error is trigger regardless of what grid.Col2.CurrentControl is set to.
>the line that triggers the error is "this.value={}".
>
>Any ideas?
>
>TIA
Is 'This.Value' part of Control.Init event? If yes, then it really can trigger a problem, because normally Grid.Column.Control inherits values,datatypes,etc from Grid.Recordsource and/or Column.Controlsource. If you want to show something in particular grid cell, then you should change value of appropriate record.field in grid.recordsource.
Edward Pikman
Independent Consultant