Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problems with Grid
Message
From
17/05/1999 14:21:32
 
 
To
17/05/1999 14:05:35
James Boden
Software Solutions For Business
Cumberland, Maryland, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00219698
Message ID:
00219707
Views:
18
Hi Jim ----

First off, if you are using the Default datasession, it should inherit the gloabal SET DELETED setting. If Private datasession, SET DELETED ON belongs in the BeforeOpenTables event of the datasession. Otherwise, strange things might happen because the grid is actually populated for the first time *before* the form Init is run.

The rest of the problem could be due to buffering issues. If you are using table buffering (which you should be since you're using a grid), then the delete button code can be really simple:

SELECT gridtable
DELETE
=TABLEUPDATE(2,.T.)
THIS.Parent.Grid1.Refresh()


>I am doing a grid on a simple form. I just has a grid and the data session defined and a couple of buttons (edit, delete, cancel, exit). Like I said a very simple form to test a problem. In the init event I place my set deleted on. Also in the grid I remove the delete mark. I then select an item from the grid and press the delete. it will delete the item that I selected but when the form is refreshed it will have removed that item and all of those above it from the grid. But if I exit and come back in all of them are there but the one I deleted.
>
>I would appreciate any feedback that I can get.
>
>Thanks Jim Boden, SSB
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05
Previous
Reply
Map
View

Click here to load this message in the networking platform