General information
Category:
Coding, syntax & commands
Title:
Deleting from a grid?
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?
Thanks again,
Randy Wessels
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only