Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Double-Click in Grid Textbox
Message
De
10/06/2010 12:52:42
 
 
À
10/06/2010 11:57:21
Mike Yearwood
Toronto, Ontario, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
Divers
Thread ID:
01468179
Message ID:
01468334
Vues:
42
>>>>Rich,
>>>>
>>>>You're running into grid's reconstruction problem (Vlad G has a good FAQ on this problem). When you programmatically assign recordsource to the grid, it looses all the code in its controls. There are many workarounds and the simplest is to use use SAFE Select approach.
>>>>
>>>I understand about safe selects. What I don't understand is how that is relevant to my problem.
>>>
>>>I put a grid on the form and create code for the dblclick event. If I can't use the form's init method to assign a recordsource to the grid, then where do I connect the grid and its data?
>>
>>I have not read the whole thread, so please forgive me if this is not an answer to your problem. The cursor which drives the grid should be created in the form's load event. Then it will already exist when the grid is created. If this empty cursor has the same structure as a table, the easiest is
>>Select * from yourtable where .f. into cursor somecursor readwrite
>
>The fastest is Create Cursor. The more complex the query, the better create cursor does, even with nodataonload or where 1=0.

I wrote easiest, not fastest. :-)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform