Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid: The mystery of the disappearing refernece (5.0)
Message
 
À
08/09/1997 13:14:49
Matt Mc Donnell
Mc Donnell Software Consulting
Boston, Massachusetts, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00048966
Message ID:
00049109
Vues:
43
>>>I have a form with a two grids. The grids are both children of a controlling table whose records are displayed in textboxes.
>>>
>>>The second grid sometimes has a filter set based on the displayed records of the first grid which also has a conditional filter.
>>>
>>>When I'm scanning through the master table, everything is fine. I can turn the various filters on and off and both grids display properly.
>>>
>>>But, when I edit the first grid (that's where all edits on the form are, all other controls are read-only), the second grid blanks out. The relationship is still there, but the grid won't display anything.
>>>
>>>Q: Can a grid be reinitialized? Or is there some other way I can prevent this from happening? Please help me.
>>>
>>>TIA
>>
>>Yes, you can reinitialize grid by:
>>cRecsource=Thisform.Grid1.recordsource
>>Thisform.Grid1.recordsource=""
>>Thisform.Grid1.recordsource=cRecsource
>>Sorry, I cannot give you more answers, because as you remember, I don't use temp relationships and prefer to use cursors (just because they are 'independent') as grid.recordsources.
>
>OK Ed, it's time for me to jump into the water and swim....
>
>This is a perfect example of where I should be using a SQL statment. I changed recordsourcetype to 4 and put the SQL statement in recordsource, but the grid won't show the result set. Refresh isn't doing anything. What am I doing wrong now?
>
>TIA

Matt,

When the SQL command has completed, try resetting the .RecordSource property of the grid. Sometimes, .RecordSource = .RecordSource works.

Steve
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform