Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Unexpected Behavior Adding Grid Columns as Listed in Tab
Message
From
24/07/2000 14:51:45
Cindy Winegarden
Duke University Medical Center
Durham, North Carolina, United States
 
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00396007
Message ID:
00396264
Views:
15
Russell,

YOU DA MAN! Here's one on me: (_)?

Actually, somehow I lost the dot before ColumnCount and it ran anyway, so I tried again starring that line out. It seems that the .RecordSource = pcTableName is really what made the difference.

Thankyou so very much for solving this one for me. I'll be using this searchable grid a lot in several apps coming up.




>Try changing it as follows :
>
>LOCAL lnOldSelect, lnKounter, lcControlSource
>lnOldSelect = SELECT()
>lnKounter = 0
>SELECT GridColumns
>WITH MyGrid
>.ColumnCount = RecCount() && THIS IS THE BIG CHANGE
>.RecordSource = pcTableName
>SCAN
> lnKounter = lnKounter + 1
> .COLUMNS(lnKounter).Header1.CAPTION = GridColumns.ColumnName
> .COLUMNS(lnKounter).READONLY = .T.
> lcControlSource = pcTableName + [.] + ALLT(GridColumns.GridColumn)
> .COLUMNS(lnKounter).CONTROLSOURCE = (lcControlSource) ENDSCAN
>ENDWITH
>SELECT (lnOldSelect)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform