Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Simple Grid Question
Message
 
À
21/06/2001 04:13:56
Jimi Lee
Pop Electronic Products Ltd.
Hong Kong, Hong Kong
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00521780
Message ID:
00521798
Vues:
16
Jimi,

This should do it.

Copy local data....

THIS.oGrid.RecordControlType = 0
THIS.oGrid.RecordControl = ""
THIS.oGrid.ColumnCount = 0
THIS.oGrid.ColumnCount = -1
THIS.oGrid.RecordControl = "c:\temp\MyCursor.dbf"

The problem is the grid needs to reload the columns. If you have the Grid's ColumnCount=-1 it will add a column for every field found in the recordsource property. So the first time the grid loads the column's ControlSource property is set to the grid's recordsource + the field name ("MySource"+"."+"FieldName"). If the RecordSource or field names are different the column will not load. Whenever you change the recordsource of a grid at runtime you should set the ColumnCount = 0 so they will be reloaded by the grid.

Will
Heavy Metal Pedal - click with care
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform