Use $("#jqgrid_id").expandSubGridRow(rowId); in the onSelectRow event of the grid.
Something like that:
jQuery("#jqgrid_id").jqGrid({ ... onSelectRow: function(rowId){ $("#jqgrid_id").expandSubGridRow(rowId); }, ... });
EDITED: GridComplete Event
jQuery("#jqgrid_id").jqGrid({ ... gridComplete: function(){ var rowIds = $("#jqgrid_id").getDataIDs(); $.each(rowIds, function (index, rowId) { $("#jqgrid_id").expandSubGridRow(rowId); }); }, ... });
John hartsock
source share