Hi Vlad,
This worked perfectly. And this is simple :)
Now I have to resolve problem with next/previous and saving current content, made couple of other changes to implement all users' requests and these applications would be finished (well, for the next users' requests :))
>Hi!
>
>This always was a problem with grids. You can catch the events before the BeforeRowColChange event by using the transparent cover shape for grid OR by using the mrow()/mcol() functions, and by using KeyPress event of the form with KeyPreview=.T. However, this is for the most universal case.
>
>I would suggest you to use the 5-th buffering anyway (because 3-d buffering is dangerous when using grds because automatic update during grid refresh - record is moved), than try following:
>
>
>* AfterRowColChange event
>if recno(this.RecordSource)<>this.nRecNo
> lnNewRecNo=recno(this.RecordSource)
> go (this.nRecNo)
> * do updating
> ...
> if lSuccess
> go (lnNewRecNo)
> this.nRecNo = lnNewRecNo
> endif
>endif
>
>
>HTH.
>
>>Hi everybody,
>>
>>I have a problem, which I can't figure out. In the valid of grid (which I call from each textbox in a grid) I determine, if fields were changed or not, and set the form flag lFieldChanged appropriately. Now when I leave this row, I want to update two fields in it. I tried AfterRowColChange method, but I update the new record, not the record, I was sitting before. Do you know, how to solve this problem?
>>
>>Here is my code:
>>
>>if .lFieldChanged
>> if inlist(.ProcType,'siteproc','ownrproc')
>> replace (.AddrField) with '6', ModiType with 'C'
>> else
>> replace (.AddrField) with '6'
>> endif
>> .lFieldChanged=.f.
>> endif
>>
>>Thanks a lot in advance.
If it's not broken, fix it until it is.
My Blog