Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP 7 Grid needs to reestablish dblclick code
Message
De
05/04/2004 19:06:03
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00891905
Message ID:
00892473
Vues:
62
>>>After I viewing table in a grid, switching sourcecode from one table to an SQL result, then returning the sourcecode back to the original table I have lost the Grid.Column3.text1.dblclick code.
>>>
>>>How do I re-instate the dbl click for this?
>>
>>Before you pull the rug out from under the grid by changing the RecordSource, do this:
>>
>>cOldRS = thisform.oGrid.RecordSource
>>thisform.oGrid.RecordSource = ""
>>* get your new data here
>>thisform.oGrid.RecordSource = cOldRS
>
>Thanx,
>But actually the restablished record source is not the problem.

It is - because once you remove the rug (recordsource) from beneath the grid's legs, it destroys all of its columns and rebuilds it with blank default columns as soon as it gets new recordsource.

>I have code in the third column text1 double click that is cleared

You can either reestablish your textbox by having it as a class (advice you already got), or keep a readwrite cursor as a recordsource (one you would create yourself, to have the proper fields), and then instead of selecting into that cursor, select into another one, then zap your grid's cursor and append from dbf("tempcursor"). This trick will have the same effect - you're getting a new set of data for your grid - but won't cause the grid to autorebuild.

back to same old

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

Click here to load this message in the networking platform