Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid confusion
Message
From
24/07/2001 04:48:30
 
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Title:
Miscellaneous
Thread ID:
00534065
Message ID:
00534262
Views:
14
This message has been marked as the solution to the initial question of the thread.
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 && record is changed
  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' && Manually-Resolved
>   else
>	replace (.AddrField) with '6'
>   endif
>   .lFieldChanged=.f.	
> endif
>
>Thanks a lot in advance.
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform