Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Disappearing grid on refresh
Message
From
11/08/1998 11:30:14
 
 
To
11/08/1998 11:24:22
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00125621
Message ID:
00125626
Views:
15
>I am creating a cursor in the load event of my form. The cursor is the record source for my grid & the record source type is set to 1. My form displays correctly for the first record, but when the cursor is rebuilt the grid box disappears & displays as a white rectangle. My cursor is rebuilding with the correct records & I am refreshing the grid. Why does the grid disappear & not refresh?
>
>TIA for any suggestions. :)

When you overwrite cursor (e.g. by running new SELECT-SQL) vfp thinks that you created completely new recordsource and kill old one and clean-up the grid. To avoid you can use two ways: either
1. Don't override cursor. You can instead SELECT INTO another cursor/array and APPEND/INSERT to existing cursor from new one.
or
2. Restore grid setting programmatically after each cursor overriding:
Select ... Into cursor tmp
Grid.RecordSource="tmp"
Grid.Refresh
This way you will be also committed to resetting specific Column properties (ControlSource, Width, etc.)
Edward Pikman
Independent Consultant
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform