Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Refreshing a grid
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00006903
Message ID:
00007281
Vues:
47
>>>Hello all! I’ve got a Grid question. I have a grid on a form displaying records from a SQL SELECT cursor. I have a check box on the form to reload the cursor based on a logical field in the source dbf. When I reload the cursor and refresh the grid, no data shows up in the grid. I checked the cursor and it does have records in it. Why won’t the grid show the new records? TIA!
>>
>>See the Tip "How to preserve the grid configuration" in the Tips & Tricks section of VFUG.
>
>Thanks for the pointer. The tip did the trick but it reset all the column widths and column ControlSources! So I just added code to store the width and controlsource values in variables with the idea of resetting them after the cursor was rebuilt i.e:
>
>lnPeriodWidth = THISFORM.grdLabforce.grcPeriod.Width
>lcPeriodSource = THISFORM.grdLabforce.grcPeriod.ControlSource
>
>THISFORM.grdLabforce.RecordSource = " "
>
>SNIP
>
>SQL SELECT here (creates cursor called Labforce)
>
>SNIP
>
>THISFORM.grd.Labforce.RecordSource = "Labforce"
>
>THISFORM.grdLabforce.grcPeriod.Width = lnPeriodWidth
>THISFORM.grdLabforce.grcPeriod.ControlSource = lcPeriodSource
>
>Seemed straightforward to me but I get an error saying "Unknown Member grcPeriod" when I try to reset the column width. The variable assignment at the beginning recognizes grcPeriod but the property assignment at the end does not. Any ideas? Thanks again!

maybe...
>THISFORM.grdLabforce.column1.grcPeriod.Width = lnPeriodWidth
>THISFORM.grdLabforce.column1.grcPeriod.ControlSource = lcPeriodSource
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform