Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
White space replaces Grid after rec-delete
Message
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00695467
Message ID:
00695590
Views:
13
Faq #8019 Grid reconstruction and how to avoid it explains this grid behavior. The simplest fix is to set Recordsource of the grid to the empty string before PACK and restore it back to the table name after that.
Thisform.grdModicomm.Recordsource = ""
PACK
Thisform.grdModicomm.Recordsource = ...
In general, PACK command is used in maintenance routines. Is there any reason you've to use it in in this case?


>Here's another game of whats-wrong-with-my-code
>If a record has been deleted the Grid disappears after this code:
>
>*** COMMAND3.CLICK UPDATE
>Set Safety Off
>nAnswer= 0
>. blah . blah . blah
>Select ModiComm
>Set Order To Grpid
>Go Top
>ThisForm.Command4.Enabled= .T.
>ThisForm.grdModicomm.Visible = .F.
>PACK
>ThisForm.grdModicomm.Visible = .T.
>ThisForm.grdModicomm.ReadOnly=.T.
>ThisForm.grdModicomm.Refresh
>Set Safety On
>
>Edits and adds don't have this problem, What's Up?
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform