>In the init method of my form i do the following
>
>=.addobject('ogrid1','gridorders')
>=.ogrid1.grid1.refresh() &&in the refresh() method I set recordsourcetype
> and header names etc
>thisform.ogrid1.visible = .t.
>
>Ronnie
Recordsource setting in refresh ? I would suggest to move it somewhere else like a custom SetRecordSource method.
Second if you need to set header names there :
-Does grid has no columns initially ?
-Or it has and you're changing them is original RecordSource is there ? If not grid would automatically redo its column objects binding to current alias destroying your added custom textboxes. Better you do add your custom textboxes on the fly.
Check Message #
487530 for some sample code changing grid on the fly with your custom header, textbox, column code.
Cetin