Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to get different Combo contents in one Grid-column?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00218055
Message ID:
00218364
Vues:
19
Yes, I tried this late last night, and it seems to work fine. It also make it possible to change control type from row to row (combo/checkbox etc.), and it's not necessary to override any bound/boundto properties or valid event go get it working.
However, for combo boxes, it seems a cleaner solution if it would be possible to do all the work in the requery method of a single combo box.

Arne


>Is it possible to make use of DynamicCurrentControl in this case and have a couple comboboxes based on the value in "columnA"??

>>They might not be in the same table, but anyway I'd like to solve this problem in as general a way as possible. Although I haven't encountered this excact problem earlier, it struck me as a quite reasonable request, so it might turn up again in the same or a slightly different form.
>>Strange if no one else has run into this situation. Anyway, I'll keep on digging...
>>
>>Arne
>>
>>>Hmm.. Are all the lookup values in a single table (oranges, lemons, pears and apples?) If so, you could set a relation to that table so that the text showed in the text box. You'd have to have a second copy of the lookup table loaded for this, but that's simple to do with USE AGAIN... alias....
>>>
>>>This would work if (for example) your table held cities but you only wanted the cities in the active row's country field to show in the combo.
>>>
>>>HTH
>>>Barbara
>>>
>>>
>>>>Thanks Barbara, but I've already tried that. The problem is that the textbox insists on showing the underlying data and displays the foreign key instead of the text...
>>>>
>>>>>Interesting challenge!
>>>>>
>>>>>I'd put both a textbox and a combo in the grid column. When the cursor goes to the column, populate your combo correctly. This could be either on-the-fly or using a pre-set series of cursors or arrays depending on whether there are many choices or only a few. When you exit the column, return the current control to the textbox. Of course you'll need code in the combo to store the value to the correct field, etc.
>>>>>
>>>>>HTH
>>>>>Barbara
>>>>>
>>>>>
>>>>>>Just stumbled over a new challenge:
>>>>>>The request is for different Combo contents in one column in a grid, depending on value in another column.
>>>>>>
>>>>>>Simplified example, first column is flag for Combo type/content, second for foreign key from Combo:
>>>>>>
>>>>>>Row 1: 1, 0 -> Here I want a combo with Orange and Lemon
>>>>>>Row 2: 2, 0 -> Here I want a combo with Apple and Pear
>>>>>>
>>>>>>I do, of course, want the text of the selected item to remain when the user moves to another row...
>>>>>>
>>>>>>I've fooled around a bit with this, and the only way I've found so far is by using a dummy character column to keep the display value. Obviously I'd like to avoid this...
>>>>>>
>>>>>>Any ideas how to accomplish this?
>>>>>>
>>>>>>TIA,
>>>>>>Arne
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform