Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Requery a grid
Message
De
15/05/2015 14:20:11
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Divers
Thread ID:
01518718
Message ID:
01619882
Vues:
185
>>Hi All:
>>
>>How do I requery a grid? In other words, my rowsource is SQL with a WHERE clause, so every time the condition changes I want to requery. There is no requery on a grid.
>>
>>Refresh doesn't seem to do the job.
>>
>>Yossi
>
>The best solution will be in using safe select approach.
>
>See http://weblogs.foxite.com/andykramek/archive/2005/03/19/174.aspx

Hi Naomi,

I referred to an answer you gave me a few years ago.

My problem is I'm not changing the WHERE; I'm changing the columns. I still want to stay with safe select, however, since I might want to add fuctionality to modify the WHERE as well.

This is the code I'm trying to run in the CLICK of an option group:
DO CASE
CASE THIS.option1.VALUE = 1
	lcCustomerColumns = GenerateColumns('')
CASE THIS.option2.VALUE = 1
	lcCustomerColumns = GenerateColumns('FAIR')
ENDCASE

lcSql = "SELECT curStock.desc, " + lcCustomerColumns + " FROM curStock"
THISFORM.safeselect(lcSql, "curGrid")
thisform.gridrefresh()
The problem is that the cursor that the grid is bound to (curGrid) doesn't change its columns.

Thanks

Yossi
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform