have a button for performing the delete function in your form. when clicked it should perform the following
in the grid highlight the row to be deleted
select the cursor linked to the grid and make it current
issue the delete command and any other validations as necessary.
refresh the grid (THISFORM.grid.refresh())
Hi,
1. If you set MyGrid.DeleteMark = .t. then you can delete by clicking on the Delete column of the Grid. This option is little dangerous with some users not understanding the Delete Marking concept. So generaly, the DeleteMark property need to be set as .f. to hide this column.
2. If you are not able to use option 1 said above, you can create a right click event for the grid.
MyGrid.RightClickEvent()
========================
** REMEMBER TO CHECK WHAT IS YOUR DEFAULT ALIAS
** AND SET SUITABLY THE ALIAS
DELETE
** CODE YO LOCATE THE RECORD POIBET SUITABLY
** FOR EXAMPLE....
SKIP
IF EOF()
SKIP -1
ENDIF
IF BOF()
APPEND A BLANK && ETC WHATEVER YOU NEED
ENDIF
=======================
hOPE THIS HELPS YOU. ramani :-9
(Subramanian.G)
FoxAcc
ramani_g@yahoo.com
LET KNOW IF THIS HELPED. ENOUGH EXPERTS ARE HERE TO HELP YOU OUT! BEST OF LUCK
Thanks weedz I'will try this way, because I can replace the field on the database using Blank next 1, but it show me the empty row, and I would like that the dele row dosn't show up on the grid.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.