Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid, how to know its bound cursor
Message
 
 
À
19/01/2003 07:47:50
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00743210
Message ID:
00743504
Vues:
31
>>The Grid class would pay attention in Dynamical re-asigment of RecordSource:

>I would create the RecordSource as an updateable cursor defined in the form's Load method using the CREATE CURSOR command. Add a custom ResetGrid() method to the grid class to populate the cursor by ZAPping it, SELECTing the appropriate records into a temporary cursor and then appending the records from the temporary cursor into the one defined as the grid's RecordSource.

Hmmm, it seems like a LOT OF WORK, I don't want to recreate the Grid after an Zapping or Packing, actually I don't use those issue, generally I use Views or RecordSourceType=4. I just want to use it for internal process. Thank you anyway.

>One way to avoid having the grid turn into a blank grey blob is to set its RecordSource to an empty string before running the SELECT and then resetting it afterward. Although this will work in the simplest of cases, it is not a solution we recommend. While it will keep your grid from losing its mind, the grid's columns still lose their ControlSources and any embedded controls. So, this works if your grid uses base class headers, base class text boxes, and displays the fields from the cursor in exactly the same order as they are SELECTed. Otherwise, you have to write a lot more code to restore all the things that get lost when the grid is re-initialized.
Apoya a Visual FoxPro usandolo legalmente
--
¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º
Espartaco Palma Martínez
SysOp PortalFox
http://www.portalfox.com
esparta@portalfox.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform