Public oForm oForm = Createobject('SampleForm') oForm.Show() Procedure GetColumnOnLeft Lparameters toGrid Local ix With toGrid For ix = .LockColumns+1 To .ColumnCount If Objtoclient(.Columns(m.ix),2) > 0 Return m.ix Endif Endfor Endwith Return -1 Endproc Define Class sampleForm As Form DataSession = 2 Height=400 Width=600 KeyPreview=.T. Add Object myGrid As Grid With ; Height=400,Width=600,Anchor=15,RecordSource='Customer' Procedure Load Set Multilocks On Use (_samples+'data\customer') * we don't want to save edits * simply setting buffering and will never update CursorSetProp("Buffering",5,'customer') Endproc Procedure Init This.myGrid.LockColumns=2 Endproc Procedure KeyPress Lparameters nKey,nShift If m.nKey = -4 And ; TYPE('this.ActiveControl') = 'O' And ; !Isnull(This.ActiveControl) And ; this.ActiveControl=This.myGrid && F5 for this sample Nodefault Local lnIndex, oColumn lnIndex = GetColumnOnLeft( Thisform.myGrid ) oColumn = Thisform.myGrid.Columns( m.lnIndex ) Wait Window ; TEXTMERGE('<<oColumn.Header1.Caption>>'+; ' - [<<oColumn.ControlSource>>]:'+; '<<EVALUATE(oColumn.ControlSource)>>') Timeout 1 Endif Endproc EnddefineCetin