>I have tried in container's texbox valid event allways return .T.(otherwise lostfocus don't fire) and in bad case set helper member in thisform (thisform.badcase = .t.). Then 2 possible cases
>1) In container.textbox.lostfocus() if thisform.badcase = .t. do -> this.setfocus() and nodefault .But control outside grid gets focus (other cells in grid no).Same result with
>container.lostfocus() and grid.lostfocus()
>2) In when event of all outside controls return .F. if thisform.badcase = .t. but anyway texbox looses focus and control with returned .f. in when receives focus.
> Perhaps there is bug.
It's exactly a bug, mostly limitation on grid. It really yields focus to other controls: this is why many people don't like to allow editing directly in grid. You may return focus back to grid from other control gotfocus event.
Edward Pikman
Independent Consultant