Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Simple Grid Question
Message
 
To
21/06/2001 04:13:56
Jimi Lee
Pop Electronic Products Ltd.
Hong Kong, Hong Kong
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00521780
Message ID:
00521798
Views:
15
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform