Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Simple Grid Question
Message
From
21/06/2001 06:04:28
Jimi Lee
Pop Electronic Products Ltd.
Hong Kong, Hong Kong
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00521780
Message ID:
00521799
Views:
18
hi Will,

Thanks, that helps!

but the grid changed to dislpay first four fields instead of the specific four fields I've chosen.
I tried to use this code to set it back but cant work:
Thisform.MyGrid.column1.controlsource=mySource.requiredField
any idea?



>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
error(503): file structure failure, signature file corrupted.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform