Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7990573
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T13:03:29+00:00 2026-06-04T13:03:29+00:00

I have a grid control in vfp9 on a form. And I have a

  • 0

I have a grid control in vfp9 on a form. And I have a button witch deletes (with pack) the current record. After I delete the record the grid doesn’t find the resource. It remains only an empty rectangle.
I maked something like this:

DELETE ALL
PACK
GO TOP
thisform.grid1.Refresh

,but without effect. Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T13:03:33+00:00Added an answer on June 4, 2026 at 1:03 pm

    As Tamar mentioned… pack is really bad in day-to-day activities. However, there is a “SETTING” that can “hide” records for you through all normal operations UNTIL a nightly handled administrative task to permanently remove the records…

    SET DELETED ON
    SET DELETED OFF
    

    By turning “ON” (and it only has to be done once for the entire application, unless you are dealing with forms dealing with private data sessions, then it needs to be done there too. SET DELETED ON tells VFP to HIDE any records marked for deletion so they don’t clutter the screen. It also keeps them hidden from any type of SQL querying too, so you don’t get the records marked for deletion.

    by SET DELETED OFF, will turn OFF the hiding and allow you to re-see any/all deleted records again. This, in case you accidentally marked a record for deletion and needed to “RECALL” it (undelete).

    Now, all that said. If you mark the record for deletion, such as your set filter after finding criteria, doing a delete all, pack, that is bad…

    All you should need in your button’s click event is to

    DELETE
    Thisform.YourGridObject.Refresh()
    

    and the record should be visually removed from the list. When you issue a PACK, it actually CLOSES the table, and thus unbinds itself from the grid, removes all deleted records, then re-opens itself via the cleaned version, but doesn’t automatically re-bind itself to the grid.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created a custom data grid control. I dragged it on windows form
I have a grid view control in my application. Please see the below code.
I need a excel-like grid control in MFC, do anyone have good suggestion to
Is it possible to have something like Data Grid or Grid View control in
I have MyContainer User Control with Grid inside. Each cell of this Grid contains
I have following user control: <UserControl.Resources> <Style TargetType=HeaderedItemsControl> <Setter Property=Template> <Setter.Value> <ControlTemplate TargetType=HeaderedItemsControl> <Grid>
I have a Grid control (not a DataGrid) and I want to remove the
I currently have the following XAML for my Grid control: <dxg:GridControl x:Name=DXGrid> <dxg:GridControl.Columns> <dxg:Column
I have a grid control. And I want to access gridview child control from
in my web application i have grid view control with edit property true. Now

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.