0

I use jqGrid 4.9.3-pre - free(Oleg). I do not use navbar panel. How do I get at Ajax after afterclickPgButtons?

I found a lot of similar themes, but almost all the navbar to panel. similar question, but jqGridAddEditAfterClickPgButtons callback I not found

ondblClickRow: function (rowid) {
    $(this).jqGrid("viewGridRow", rowid, {
        beforeShowForm: function(form) {
            $.ajax({
                url: 'apt_data.php',
                method: 'POST',
                dataType: 'json',
                data: {id: rowid},
                success: function(data) {
                    $(html_var).insertBefore($('#trv_tm', form));
                }
            });
        },
        caption: "Details of the invice"
    });     
},
Community
  • 1
  • 1

1 Answers1

1

If you need to have some close to the code, but with viewGridRow, then you need just change the name of jQuery event to jqGridViewBeforeShowForm and jqGridViewAfterclickPgButtons. You can use jqGridViewClickPgButtons which will be triggered before jqGridViewAfterclickPgButtons, but it will be needed more seldom:

$("#list").jqGrid({
    // ...
}).bind ("jqGridViewBeforeShowForm", function (e, $form, oper) {
    alert("In jqGridViewAfterShowForm");
}).bind ("jqGridViewClickPgButtons", function (e, whichButton, $form, rowid) {
    alert("In jqGridViewClickPgButtons: " + whichButton + ", rowid=" + rowid);
}).bind ("jqGridViewAfterclickPgButtons", function (e, whichButton, $form, rowid) {
    alert("In jqGridViewAfterclickPgButtons: " + whichButton + ", rowid=" + rowid);
});

see https://jsfiddle.net/OlegKi/cnyon3tt/2/

Community
  • 1
  • 1
Oleg
  • 220,925
  • 34
  • 403
  • 798