Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Refresh cell in a grid
Message
 
 
À
25/07/2001 13:19:59
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00535086
Message ID:
00535221
Vues:
37
>>>Nadya,
>>>
>>>add this code to the ProgrammaticChange() of this.parent.parent.column2.text1
>>>
>>>if( this.Value <> eval(this.ControlSource) )
>>>    replace (this.ControlSource) with this.Value
>>>
>>>    this.Refresh()  && not sure whether this is necessary
>>>endif
>>
>>I tried that, but it didn't work :(
>>>
>>>another possibility would be to set up a relation between the table of your grid and curTowns and make the ControlSource of the column CurTowns.ccode
>>
>>Right, but in this case the main table would not be updated. I can, though, program around it, if there is no other way. Actually, this is not a big problem, but a little bit annoying. All other problems, which I mentioned in my reply to Cetin, are more important. I'm thinking, that combo in a grid is a bad choice. May be I have to create a container based class instead?
>>
>>What would be suggestions here?
>>
>>Thanks in advance.
>
>Do not see why it does not work. I use it all the time
>
>
>Just browsed through your Init() of the grid. two things come to my mind
>(1) is the combo visible at all ? Where do you set the visible property to TRUE
>
Yes, it's visible once I put focus on this cell. Since I placed both controls in design time, it's visible. I followed your advice (or was it Cetin's?) and didn't remove text1, which didn't change a bit.

>(2) if you remove the text1, then you better set the combo (column) SPARSE to FALSE

I tried that, but the grid looks awful in this case, so I set it back to true.


I'll try ProgrammaticChange one more time. I've just read about not using grids at all in Effective Technique, which is depressed me even more.

Basically, here is the situation:

My colleague worked on this application since 1999. Recently it was turned to me. Of course, there were bunch of problems and even bugs, so I almost completely re-design this application in a week. My colleague programmer, who tested this application from the user point of view, made two suggestions, which I implemented (was not a trivial task). Now another user (which is a real user) tested this application and, of course, there is a long list of requests, which are quite complicated to implement.

For instance: this form appeared in a situs order (in case of one regim, in another case it would be in OwnerAddr order). When the user changes street, the current context is lost. I have to somehow save the current context. I'm still thinking about resolution of this problem.

Another problem, which I solved with Vlad's help (though it was my original idea too): change status of the field to Manual-Resolved only when the row changes (not to mention, that I need to re-validate the street).

Yet another request: make a town field editable and make it as a combo for several regimes. Fine, I'm trying to implement it, but the result is very far from desirable... Just curious, did somebody use combos in a grid with ability to change value and it should update another field? It works when the combo looses focus, but not in InteractiveChange...

I also got a weird class is in use problem with only one particular class. I didn't have it before :( I tried to clear class addringrid in commad window, which is doesn't help. I tried clear classlib addrstd.vcx, which doesn't help either. Only clear all works. What may cause this problem?
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform