Ok, catch it
thisform.AddObject('Grid1','Grid')
with thisform.Grid1
&& assign main thing - data source
.RecordSource = "MyAlias"
.ColumnCount = 10
&& define control sources - what each column will display
.Column1.ControlSource = 'MyAlias.Field1'
.Column2.ControlSource = 'MyAlias.Field2'
........
.Column10.ControlSource = 'MyAlias.Field10'
&& define column widths
.Column1.Width = 100
.Column2.Width = 50
.......
&& define column header captions
.Column1.Header1.Caption = 'Field1Caption'
.Column2.Header1.Caption = 'Field2Caption'
.......
&& Sample of how to add custom object into column
.Column2.AddObject('Combo1','MyCombobBoxClass')
.Column2.Combo1.Visible = .T.
.Column2.CurrentControl = 'Combo1'
&& remove original (default) control
.Column2.Text1.Visible = .F.
.Column2.RemoveObject('Text1')
&& define properties of combobox in column
with .Column2.Combo1
.ColumnCount = 2
.ColumnWidths = 30,50
.......
endwith
&& Don't forget to show grid

.Visible = .T.
endwith
Vlad Grynchyshyn
vgryn@softserve.lviv.ua
The professional level of programmer could be determined by level of stupidity of his/her bugs