Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Refresh of the grid when deleting records
Message
From
13/03/1996 23:12:50
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00000213
Message ID:
00000272
Views:
57
Ok, here's what another resource on our project found yesterday to solve this grid "feature by design".

First let's say that even if we have SET DELETE ON, when we will delete a record in a grid, sometimes even after a refresh, the record stay there. We have to move to another record, skip or skip -1 will do it.

Secondly, if you are on the last record, this will not work. So, here's the funny part. After you delete the record, do something like this:

ThisForm.LockScreen=.T.
lnOldHeaderHeight=ThisForm.Grid.HeaderHeight
ThisForm.Grid.HeaderHeight=ThisForm.Grid.Height
ThisForm.Grid.HeaderHeight=lnOldHeaderHeight
ThisForm.LockScreen=.F.

By resizing the row height to be a full size of the grid and then back again, this was ok to remove the record. And now, we don't have this problem anymore.

Thanks to Michel Lalonde for this workaround.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform