Hi Mallari.
>> If i press F2(-1) Key from any column, It runs Valid and Lost focus code of "Column1.Text1". I dont want to run valid code when i am setting focus to that. <<
Since you are not going to change the way in which the events fire, your best bet is to set a flag so you can decide when to execute the code. Something like this might work:
Add a property to your grid class and call it something like lSettingFocus. Then:
If Lastkey() = -1
ThisForm.Grid1.Column1.Text1.lSettingFocus = .T.
ThisForm.Grid1.Column1.Text1.SetFocus()
ThisForm.Grid1.Column1.Text1.lSettingFocus = .F.
EndIf
Then, just wrap the method code with
IF !ThisForm.Grid1.Column1.Text1.lSettingFocus
(Your code here)
ENDIF
Marcia