jqgrid open subgrid only if there is some data
问题 here is declarations of my subgrid: subGrid : true, subgridtype: 'json', subGridUrl: 'manuf_subgr.php', subGridModel: [{ name : ['Package','Sticker','Manufacturer'], width : [85,50,100], params: ['Catalogue'] } ], gridComplete: function() { var timeOut = 50; var rowIds = $("#schedule").getDataIDs(); $.each(rowIds, function (index, rowId) { if(rowId.row_cnt != 0){ setTimeout(function() { $("#schedule").expandSubGridRow(rowId); }, timeOut); timeOut = timeOut + 200; } }); } what I expect to