Puting a confirmation question when the user tries to delete a row in the datagrid

Hi everyone, I tried to implement the issue described in the datagrid section, article 5.57, so that everytime a user selects a row by clicking o its header, a confirmation message should appear. I found the following situation: If I select a cell and delete the data in it, then I select another row by clicking on its header and then if I press "Delete" the row is deleted without any message. Am I missing something or this is a bug?

Loader.
Up arrow icon