* dbf teste champs1 c(10), champs2 c(10) close all use teste oform=createobject("teste") with oform.grid1 .column1.header1.Caption = "ColA" .column1.header1.Name = "Header1" .column1.text1.Name = "Text1" .column2.header1.Caption = "ColB" .column2.header1.Name = "Header1" .column2.text1.Name = "Text1" endwith oform.show() i=inkey(0) close all DEFINE CLASS teste AS form Caption = "Form1" Name = "Form1" ADD OBJECT grid1 AS grid WITH ; ColumnCount = 2, ; Height = 169, ; Left = 48, ; RecordSource = "teste", ; RecordSourceType = 0, ; Top = 24, ; View = 0, ; Visible = .T., ; Width = 253, ; Name = "Grid1", ; Scrollbars =2,; Column1.ControlSource = "teste.champs1", ; Column1.Width = 75, ; Column1.Resizable = .T., ; Column1.Name = "Column1", ; Column2.ControlSource = "teste.champs2", ; Column2.Width = 100, ; Column2.Resizable = .F., ; Column2.Name = "Column2" ENDDEFINE