Hi Pete ----
OK, assuming that you have run David's program and the View Caption properties are set the way you like them, in the Init of the Grid, you could run some code like the following:
FOR i = 1 TO THIS.ColumnCount
cFieldName=THIS.Columns(i).ControlSource
THIS.Columns(i).Header1.Caption = DBGETPROP(cFieldName,"FIELD","Caption")
ENDFOR
>David,
>aplogies for the direct mail, I copied your dbcviewprops.prg from your website and it works fine ( thank you ). However I've just discovered a few other things ( I know I'm a bit slow but I don't use that many grids )
>
>1) VFP uses its own grid ( naff ) if you select a view/table from the DE.
>2) If you use your own grid and set the ControlSource to fields in a view, you don't get the view/table captions.
>
>Is there any way to set a grid template?
>Four days to main beer drinking session.
>Regards
>Pete Kane
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05