Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Disappearing Grid
Message
From
03/02/1999 09:08:26
 
 
To
02/02/1999 09:38:42
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00182897
Message ID:
00183369
Views:
13
>>I have a formset and one form has a grid for browsing a file. At times I need to close the file and then reopen it again. Since the grid momentarily looses its data source, it disappears. Is there an easy way to recreate the grid? Right now I'm releasing the whole formset and recreating it again. All I need is just to get that one grid back. Do I need to hard code the grid in a routine and call the routine?
>>
>After data source reopening you should also restore grid recordsource and column.controlsources:
>With Thisform.Grid
>.Recordsource="mytable"
>.Column1.Controlsource="mytable.myfield1"
>.Column2.Controlsource="mytable.myfield2"
>***
>.Refresh
>Endwith

If I don't remove the RecordSource first, I lose my grid's formatting (and there's a lot of it to reconstruct). If I remove the RecordSource first, the grid appears to retain its format after I restore the file and restore the RecordSource. However, the grid no longer displays records. By setting an OKL to issue the SET command, I can quickly look at my open files, relationships, etc. Everything looks right except the grid won't show any records. I think I've lost something in the process but I don't know what.

My files are not specified in the data environment of the forms in the formset. I'm opening them before the forms are created. Maybe that has something to do with it.

Everything works fine if I clear my formset and then restore it again. I'd just rather not have the screen go blank momentarily. Is there a way to reference only one specific form in the formset, destroy it and then recreate it again. That wouldn't be so much of a big screen change.

Allen
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform