Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Two controlsources in the same cell of a grid
Message
De
21/04/2006 01:22:57
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Titre:
Two controlsources in the same cell of a grid
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP1
Database:
Visual FoxPro
Divers
Thread ID:
01115235
Message ID:
01115235
Vues:
61
I have a column which needs to display (and, hopefully, allow editing of) character fields in two tables at the same time. The table contains a hierarchy, and the top two levels have this character field in table1 (which is the recordsource of the grid), however any lower level is linked to table2 (via a FK) and I need to display the proper field from that other table.

I have several containers, with two textboxes each. The first textbox displays the outline number (a field in table1), the other displays the character field - say, table1.cTitle for table1.level=1 or 2, and table2.cTitle for levels 3 and on. The containers are passed the level on .init, and are named cnt1, cnt2 etc. The column.dynamicCurrentControl="cnt"+tran(table1.level), and they show properly. Column.sparse=.f.

There's also some indentation involved, but that's not the problem.

The problem is that whatever I do, as soon as any of these containers gets focus, they all get table2.cTitle for controlsource - checked in the debugger. Since table2 is related via this FK, there's nothing shown in this column for levels 1 and 2.

Now is this another grid feature? I tried with and without the controlsource for the column. Why would the controlsource of a textbox in a column change?

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform