PHPRunner normally provides Delete selected for removing one or more records from a List page. In some applications, it is more convenient to place a Delete action directly on each row next to the standard View, Edit or Copy actions.
This tutorial shows how to add a row-level Delete button, ask for confirmation, delete the correct record and reload the List page afterward.
Before you add the button
Place the custom button inside the grid row. This is important because the button needs access to the current record so the server-side code can determine which row should be deleted.
You will also need to know the table name and the key field used to identify each record. In the example below, the table is categories and the key field is CategoryID. Replace those values with the corresponding names from your project.
Security note: a custom button that calls DB::Delete() does not automatically inherit all of the behavior of PHPRunner’s standard Delete action. Make sure the button is only available to users who are allowed to delete the corresponding records, and add any additional permission checks your application requires.
1. Add the button to the grid
Open the List page in Page Designer and insert a button. Move the button into one of the grid columns so it becomes part of each record row.
Choose a button style that matches the other row actions, such as View or Edit. Select an appropriate delete or trash icon from the icons available in your current PHPRunner version.

Continue Reading "Add a Delete Button to Each Row in a PHPRunner Grid" →