Information générale
Catégorie:
Gestionnaire d'écran & Écrans
>>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?
>
>What I do is
>Thisform.grdTotal.RecordSource = ""
>SELECT ;
> INTO CURSOR qprTotals
>Thisform.grdTotal.RecordSource = "qprTotals"
>Thisform.grdTotal.refresh
>This maintains my grid formatting by setting the recordsource to nothing first.
That is bizarre. It worked and for that I am grateful. However, I am not sure why it worked.
Thanks so much,
Jeff
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement