>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.
Hi Eric,
I think I'll use your advice in another situation. Today I already solved this problem. I created a class called GridText with this method in InteractiveChange:
this.parent.parent.ChangeValue(this)
I substituted column's textboxes with this GridText class (did it manually), then I saved grid as a class (in the same library as GridText) and add a method to this grid called ChangeValue.
lparatemer toControl
local lcFieldName
lcFieldName=upper(justext(toControl.ControlSource))
do case
case lcField="APN"
otherwise
endcase
I hadn't time to test it throughly today, so I'll resume my tests tomorrow, but I think, that's pretty much covers my situation.
Thanks to everyone, who helped me in this thread.
If it's not broken, fix it until it is.
My Blog