Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid Row Control
Message
 
To
14/09/1997 02:32:20
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00050047
Message ID:
00050174
Views:
21
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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform