Hi there,
As nobody was able to help me, I chose to hide the butons when nothing is selected. Doing so, user is not able to show the alertmod. Here is how to hide the butons when nothing is selected (this is an option of the jqGrid() function):
onSelectRow: function (rowid) {