> Hello everyone
>
> Scenario:
> 1. i have a grid which source is a cursor that has no index
> 2. i have a button for delete
> 3. when user select a record in the grid and click the button delete, it must delete the selected record in the grid
>
> can someone help me on the code for this
YOUSFI BENAMEUR
set deleted is off by default ,put it to set deleted on.
IF YOU HAVE delemark=.t. you can delete visually the records you want .On your form in your button put only in the click event:
thisform.grid1.refresh
if you have deletemark=.f. put this code in buttoncommand.click.the record selected is deleted after the click on button:
sele mycursor
delete
thisform.grid1.refresh