我正在使用jqgrid的旧版本,并且需要所有页面的所有过滤记录ID。从Stack Overflow看到以下答案,但以下代码对我不起作用:
var oldFrom = $.jgrid.from, lastSelected;
$.jgrid.from = function (source, initalQuery) {
var result = oldFrom.call(this, source, initalQuery),
old_select = result.select;
result.select = function (f) {
lastSelected = old_select.call(this, f);
return lastSelected;
};
return result;
};