Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Losing grid settings
Message
From
02/03/2000 13:47:41
 
 
To
02/03/2000 13:07:20
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00340681
Message ID:
00340731
Views:
28
>>>>Because you can't "ZAP" an SQL-SELECT cursor
>>>
>>>I thought he was creating a cursor with "CREATE CURSOR mycursor..."
>
>
>>Possibly, but 99% of the time I use a cursor from a SQL-SELECT with a grid.
>
>Maybe it not a good programming practice, but when I know for sure that SQL-SELECT will return no more then a few hundred records, I create a cursor in the thisform.load() and set the grid properties in the thisform.init(). Then just zap and populate the cursor as needed and refresh the grid. This way the grid stays intact. As you know foxpro will go through a few hundred record in matter of seconds. Anyway that was what I was getting at.

It sounds like you should really be using views. Someday, I'll get around to them myself. But for now, zapping the Grids.RecordSource property works for me. We built code into our base grid that saves/restores the column stuff. And now with Access/Assign, it's all "behind-the-scenes".
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform