>>I use the following approach which works well in that the Valid method fires only when the user makes a change to the text box.
>>
>>I set up a property THISFORM.changed.
>>
>>In GotFocus:
>>THISFORM.changed = .F.
>>
>>In InteractiveChange
>>THISFORM.changed = .T.
>>
>>In Valid:
>>If THISFORM.changed
>> Check validity of data
>>ELSE
>> Return
>>ENDIF
>>
>>In LostFocus
>>THISFORM.changed = .F.
>
>That's similar to Daniel's suggestion, though now three methods affected. I guess, I have to use special textbox class for this and substitute grid column textbox with this class.
You may want to consider not allowing editing in the grid at all. You could probably allow editing through an interface via a command button. For example: you have a field that you may want to be editable, but only under certain conditions. Then use a modal form and pass the current value to it. Then, if they actually edit the value in the edit interface, do your validation, otherwise, carry on like it never happened. This way your user is out of the grid completely and it is much easier to make sure they don't foul something up. Which I think is what you are trying to do here.
Eric Kleeman - EDS Consulting Services
MCP Visual FoxPro
MCSD C#.NET
Hua Hin Thailand
Los Angeles California