1、jqgrid在加载完成之后展开SubGrid,用得如下办法:
gridComplete: function () {
var rowIds = $("#list2").getDataIDs();
$.each(rowIds, function (index, rowId) {
$("#list2").expandSubGridRow(rowId);
});
}
2、第二种方式:jqgrid异步加载数据的
gridComplete: function() {
var timeOut = ;
var rowIds = $("#list11").getDataIDs();
$.each(rowIds, function (index, rowId) {
setTimeout(function() {
$("#list11").expandSubGridRow(rowId);
}, timeOut);
timeOut = timeOut + ;
});
}
来源:https://blog.****.net/hu764525403/article/details/50234155?locationNum=2&fps=1