Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Updating grid data source.
Message
 
 
À
03/03/2003 20:45:52
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00760666
Message ID:
00760725
Vues:
13
>>>>I need to close and reopen the data source (a cursor) for a grid without adversely affecting the grid.
>>>
Thisform.grid1.RecordSource = SPACE(0)
>>>* Create/recreate cursor
>>>...
>>>Thisform.grid1.RecordSource = "mycursor"
>>>Thanks for the quick response.
>>>
>>>When the cursor is refreshed, the grid is now showing all columns instead
>>>of a subset.
>>
>>You've to set recordsource of the grid to the empty string before you do anything to a cursor.
>
>This is what I am doing, here is the code:
cCurrentRecordSource = This.Parent.Parent.pagDetails.grdOrDetails.RecordSource
>This.Parent.Parent.pagDetails.grdOrDetails.RecordSource = SPACE(0)
>
>SELECT * ;
>	FROM OrDetail ;
>	INTO CURSOR curCurrentOrder ;
>	WHERE OrDetail.cOrder = cValue ;
>		AND ALLTRIM(OrDetail.cOrder) IN (Select Drawings.cOrderID FROM Drawings) ;
>	READWRITE
>
>This.Parent.Parent.pagDetails.grdOrDetails.RecordSource = cCurrentRecordSource
See Grid reconstruction and how to avoid it FAQ #8019.
--sb--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform