Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Deleting from a grid?
Message
 
 
To
13/06/2004 13:13:55
Randy Wessels
Screentek Business Solutions, Llc.
Phoenix, Arizona, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00913250
Message ID:
00913272
Views:
18
Hi Randy,
Try
IF ...
	DELETE
        TABLEUPDATE()
	THIS.Parent.Parent.Refresh()
...
>I a grid with several columns - the first column is a command button labelled delete.
>
>This is the code behind that button:
>
>IF MESSAGEBOX('Are you sure you want to delete this Cash Receipt?',36,'Delete Cash Receipt')=6
> SELECT cashtemp
> DELETE
> GOTO TOP IN cashtemp
>ENDIF
>TABLEUPDATE(2,.T.,'cashtemp')
>THISFORM.REFRESH
>
>The problem is that regardless of which row you are on when you click delete, it deletes the FIRST row. Then it doesn't refresh the display immediately. I am thinking that I need to re-populate the grid's cursor to do the refresh, but I am not sure how to delete the specific row that I click on. Any ideas?
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform