Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid confusion
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Titre:
Divers
Thread ID:
00534065
Message ID:
00534843
Vues:
11
Hi!

Glad you solved this. Good luck!

>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 && 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.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform