Use "C:\Program Files\Microsoft Visual FoxPro 8\Samples\Data\orders.dbf" In 0 Alias MyRecordSource oGridTest = CreateObject ("frmGridTest") oGridTest.Show () Clear Events Close DataBases All Define Class cPtrGridLB as Grid *------ ----- ---------- -- ---- Top = 0 Left = 0 Height = 100 Width = 100 RowHeight = 16 FontName = "arial" FontSize = 8 GridLines = 0 GridLineColor = Rgb (192,192,192) DeleteMark = .F. RecordMark = .F. SplitBar = .F. AllowAutoColumnFit = 0 AllowHeaderSizing = .F. AllowRowSizing = .F. AllowCellSelection = .F. HighlightStyle = 2 HighlightForeColor = Rgb ( 0, 0, 0) HighlightBackColor = Rgb (165, 210, 255) RecordSourceType = 1 RecordSource = "MyAliasName" ReadOnly = .T. Visible = .T. EndDefine Define Class frmGridTest as Form *------ ----- ----------- -- ---- Height = 400 Width = 560 Name = "frmGridTest" Caption = " What's happenning with this Grid?" WindowType = 1 Closable = .T. ControlBox = .T. MaxButton = .F. MinButton = .F. Movable = .T. ZoomBox = .F. SizeBox = .F. AutoCenter = .T. ShowWindow = 0 * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Add Object grdTestGrid as cPtrGridLB with Top = 5 , ; Left = 5 , ; Height = 360 , ; Width = 550 , ; RecordSourceType = 1 , ; RecordSource = "MyRecordSource" * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Add Object cmdCancel as CommandButton with Top = 370 , ; Left = 480 , ; Height = 25 , ; Width = 75 , ; FontName = "Arial" , ; FontSize = 8 , ; Cancel = .T. , ; Caption = "\<Close" * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Procedure cmdCancel.Click * --------- ----- ThisForm.Release EndProc Procedure grdTestGrid.Init * ----------- ---- This.Column1.Visible = .F. This.Column2.Visible = .F. This.Column3.Visible = .F. This.Column4.Visible = .F. EndProc Procedure QueryUnload * ----------- ThisForm.cmdCancel.Click NoDefault Return .T. EndProc EndDefine