Confirmation box for grid row delete?

How to pop up a confirmation box for grid row delete?

Scenario :
I try to delete a record from ListGrid using following method
ListGrid.removeData(item);
Now , on server side before removing the record from database , I perform a validation check,
While validating , there is a particular condition which requires user confirmation before delete.
How do can I get that confirmation from user ?

Is it a condition you can check for before you do the ListGrid.removeData ?

Send back an error response (status=-1) and handle it from editFailed.