Gary,
Here's the code that resides in the xDelete method of my base grid:
select (this.recordsource)
delete
this.refresh()
This xDelete method gets called by a delete button of which the when method contains the following code:
if type("thisform.activecontrol.name")<>"C"
*-- assume you are deleting the record/document
*-- let click handle it.
return
endif
*? because in the when the grid is still active.
if upper(thisform.activecontrol.baseclass)='GRID'
thisform.activecontrol.xdelete()
thisform.yTotals()
return .f.
endif
So when the user clicks on the delete button and the grid is active, the current line is deleted, and it disappears from the screen. Set Delete must be on of course and I always submit created cursor to grids.
HTH,
Marc
If things have the tendency to go your way, do not worry. It won't last. Jules Renard.