Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Listbox in a grid
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00045849
Message ID:
00045982
Vues:
36
>I have a listbox as the .CurrentControl in the second column of a grid. It's values would be dependent upon the values in the first column of the grid. I'm a little leary of populating this listbox with the .RowSource as an alias because that might create too many open cursors as the grid could have lots of rows. I've set up a small SQL query in the .Requery method of the listbox which sends the results to an array. So far so good except the only values displayed (in all listboxes) are the end results from the last record in the grid. I need a good way to populate the listbox which would be able to properly read the value in column 1 of the grid.
>
>If you're about to suggest a grid in a grid, well I've done that and have a major bug. I've posted the question here and no one answered. I've sent the problem off to M$ tech support and have not received an answer from there yet either. This has caused me to experiment with using the listbox in column 2 rather than anothe grid but I need the best way to populate it.
>
>Thanks,
>Steve Despres
Steve,

The problem that yu must overcome is the fact that even though you see multiple lists on each row, there is really only one listbox object and it is on the current row. Therefore when you requery that real listbox all of the other ghosts will show the same data.

One solution that may help would be to set the Column's Sparse property to .T.. That way the list is only visible when the user enters the active column and the other rows in thast column are simply showing the controlsource's current value for those records. You could even make this a little nicer by changing the rowheight when that column gets focus and changing it back when teh column looses focus, this way there is not a huge rowheight when no lists are being displayed.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform