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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only