jqGrid afterclickPgButtons 绑定?

jqGrid afterclickPgButtons bind?

我使用 jqGrid 4.9.3-pre-free(Oleg)。我不使用 navbar panel。我如何在 afterclickPgButtons 之后到达 Ajax

我发现了很多类似的主题,但几乎所有的导航栏都是面板。

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"
    });     
},

如果您需要一些接近 ,但 viewGridRow,那么您只需将 jQuery 事件的名称更改为 jqGridViewBeforeShowFormjqGridViewAfterclickPgButtons。您可以使用 jqGridViewClickPgButtons,它将在 jqGridViewAfterclickPgButtons 之前触发,但很少需要它:

$("#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);
});

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