Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Datasession
Message
From
04/06/1997 20:30:51
 
 
To
04/06/1997 16:25:19
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00035067
Message ID:
00035105
Views:
47
>>>Yes, 'in run-time' means in code.
>>>Thisform.Grid.RecordSource=newalias && I assume you use RecordSourceType=1
>>>Thisform.Grid.Refresh
>>
>>Still not happening for some reason, the orig dbf is still showing up.
>>Does the code get put in the activate cell area?
>
>Put this code into some button click event and test it from there.

One thing that seems to give the grid the appropriate "push" is to reset the columns - like this:

WITH Thisform.grdMyGrid
.ColumnCount = 0 && destroy all old columns
.ColumnCount = -1 && grid automatically allocates columns
.RecordSource = "MyNewAlias" && assign new alias
.Refresh() && redraw grid
ENDWITH

If the grid has a lot of columns, you might want to wrap this in a .LockScreen, but it's not usually necessary.
David M. Stowell
Ravenslake Consulting
Chicago, Illinois

e-mail: davidstowell@ravenslakeconsulting.com
Previous
Reply
Map
View

Click here to load this message in the networking platform