To add a delete icon with JavaScript in Oracle Apex, you can follow
these steps:
- Create a new column in your report for the delete icon. Set the column
type to "HTML Expression" or "Display Only" as per your requirement.
- In the column attributes, add the following HTML code for the delete icon:
Here, we are using the Font Awesome library to display the delete icon. You can replace "fa-trash" with any other icon name from the library.
In this function, "DELETE_ROW" is the name of the page process that will handle the row deletion. You can replace it with the actual name of your page process. "P1_ROW_ID" is the name of the item that will hold the ID of the row to be deleted. You can replace it with the actual name of your item.
row to be deleted. You can replace it with the actual name of your
column.
- Save and run your report. You should now se a delete icon in each row of the report. When the user clicks on the icon, the JavaScript function will be called and the row will be deleted if the user confirms the deletion.