How to delete editable grid rows from database

I have used the remove icon as the last column of each row of the editable grid. When I click on it the respective row gets deleted from the rule input it is storing but not from the database table. I am using the below code:

How to delete the specific row from database table as well by clicking on remove icon?

  Discussion posts and replies are publicly visible