Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid format disappears when datasource changed
Message
De
30/12/1997 12:19:18
Jeff Tucker
Mackinac Center For Public Policy
Midland, Michigan, États-Unis
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Grid format disappears when datasource changed
Divers
Thread ID:
00068445
Message ID:
00068445
Vues:
67
I used the grid builder wizard in VFP 5.0, and selected the ledger feature to make every other line of the grid green.

The builder placed the following code in the dynamicBackColor of the columns of the grid to alternate the green.
IIF(MOD(RECNO(),2)=1,RGB(255,255,255),RGB(192,220,192))

I set the following properties on the grid.
recordSource = qprTotals
recordSourceType = 1-Alias

I want to change the data that appears in the grid based on the selection of a radio button. When the user selects a button, a query is constructed and run. The query refreshes the data in qprTotals.

SELECT ;
INTO CURSOR qprTotals

Then I specify the recordSource and refresh the grid.

Thisform.grdTotal.RecordSource = "qprTotals"
Thisform.grdTotal.refresh

The grid immediately loses its formating. The proper header captions change to query field names. The grid becomes grey and ordinary. The only thing that works is I get the correct data each time I click a different button.

Am I going about this wrong? How can I make the grid retain the formating?
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform