Delete selected items with a button

I have a grid. I want to delete selected record with a button.
can you send me a code please. Thank you.

See the documentation for RUN button.
There are two events for RUN button

  1. In the event OnRecord you construct the list L of records to be delete
  2. In the event OnFinish you loop through the list L and delete one by one