Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid Question
Message
 
À
19/01/2001 11:23:08
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Titre:
Divers
Thread ID:
00465700
Message ID:
00465762
Vues:
9
>I knew the GridKing wouldn't be able to resist a reply! :-)

:)

>>You need to add "INTO CURSOR myColumnXComboSource" to your SQL:
>>"Select * From destinations Where destinations.receiver = gridalias.receiver >INTO CURSOR myColumnXComboSource"
>
>Won't this confuse VFP? Will this try and create a new cursor for each line on the grid? What happens for all the other lines in the grid apart from the currently selected one?

No, there will be just one cursor as there is really just one combobox in the column. Besides, the SQL statement sends the result into the same cursor name.
You should test it with the ControlSource and .column.Sparse set to appropriate values, and see if the results satisfy you,


>>You will need to add to your Grid.AfterRowcolChange():
>>this.column5.combo1.Requery() && assuming that the combo is in column 5
>>this.column5.combo1.Refresh()
>>this.column5.combo1.ListIndex = 1 && so you see the first combo item right away.
>
>I know ;o( It needs doing generically for any/each column which has a Combo

You might loop through the column controls and check if the CurrentControl is a combo, then substitute the code with real references and execute the code which may refer the paricular combos. Grid Highlighter works this way.

>>You might need to change this sample code as you adding the combos on the fly >and I don't know if they always supposed to be in the same columns.
>
>I hate to think what the performance impact will be on a large table... only one way to find out... - Hi Hoooo

It may hit you! Watch out! :)
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform