I have a grid. The first column is a checkbox for each row. The second column has two action buttons for each row: edit and delete. When a click on the edit button or delete but
I don't sure that I understand full scenario which you are implementing. So I try to answer on your main question only: how one can detect inside of onSelectRow
callback that the callback called because Delete button was clicked.
You can use 3-d parameter of the onSelectRow
. The corresponding code could be about the following:
onSelectRow: function (rowid, status, e) {
var $div = $(e.target).closest(".ui-pg-div");
if ($div.hasClass("ui-inline-del") && $div.attr("id") === "jDeleteButton_" + rowid) {
alert("Delete button was clicked");
}// else if ($div.hasClass("ui-inline-edit") && $div.attr("id") === "jEditButton_" + rowid) {
// alert("Edit button was clicked");
//}
}