>You should ask VladG about grids not me. He knows everithing about them. :)
He was not here for few months :( Too busy at work.
Anyway, here is my own solution (not elegant). I added a new property to grid class DontLeave. I set it to true if Valid returns .f. (otherwise to false). And in Save method I check for this property at the top of the method and move focus back to the grid, if it's true.
>
>>Well, I would like to make an exception and see your suggestions :)
>>
>>>I'm disregarding this message.
>>>
>>>>
Update. Disregard. Found a solution already.
>>>>
>>>>Hi everybody,
>>>>
>>>>I have implemented some validation in the grid. I put if not this.ValidateCurrentRow() return .f. in Grid's valid method. I have a save button on the form (Save method fires also by F9). When I press F9 at first Valid of grid is fired, but then the Save method is fired.
>>>>
>>>>How can I just execute grid's Valid and prevent grid from loosing focus? Is placing grid in the container the only way?
If it's not broken, fix it until it is.
My Blog