jqGrid afterclickPgButtons绑定?

时间:2016-01-12 06:46:16

标签: jqgrid free-jqgrid

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

我发现了很多类似的主题,但几乎所有的导航栏都是面板。 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"
    });     
},

1 个答案:

答案 0 :(得分:1)

如果您需要接近the code,但需要@Override public JSONObject userSignIn(String user, String pass,String version, String authType, String URL) throws Exception { urlBuilder = new StringBuilder(URL); urlBuilder.append("?uname=" + user); urlBuilder.append("&passwd=" + pass); urlBuilder.append("&ver=" + version); URI=urlBuilder.toString(); return VolleyLoginExecute(new VolleyCallback() { @Override public JSONObject onSuccess(JSONObject result) { responce = result; return responce; } }); } ,则只需将jQuery事件的名称更改为viewGridRowjqGridViewBeforeShowForm即可。您可以使用jqGridViewAfterclickPgButtons之前触发的jqGridViewClickPgButtons,但很少需要它:

jqGridViewAfterclickPgButtons

请参阅https://jsfiddle.net/OlegKi/cnyon3tt/2/