Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Fickle Grids
Message
 
To
21/10/2002 14:41:00
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Miscellaneous
Thread ID:
00713610
Message ID:
00713625
Views:
11
This message has been marked as the solution to the initial question of the thread.
>I am displaying a grid on my form. The grid is linked to a table with recordsourcetype = alias. I am briefly doing a 'USE IN' on the table in the grid in order to zip the file. This apparently causes the grid to become blank. I try to use the table again with the proper alias, refresh the grid, and refresh the entire form. Nothing seems to make the data appear back in the grid. However, when I try to reset grid1.recordsource = 'mytable' the data appears, but all my columns are not the right size and the code associated with the grid click events are gone. Any ideas on what I am doing wrong?
>
>TIA, Baron

This happens because you close the grid RecordSource cursor. Basically, you just rip the RecordSource from under your grid. As Tom pointed out, set grid.RecordSource = "" before closing the cursor and restore it after you ZIP the table. If you use your grid columns not in the default order (as they appear in your cursor), you might need to remember the each column ControlSource, and individually reset them in the right order too, after you restore the grid.RecordSource.

For more details see FAQ#8019
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform