$("#selectId").button().click(function () { var idToSelect = $("#selectedId").val(), // id of the row which need be selected localRowData = $grid.jqGrid("getLocalRow", idToSelect); while (localRowData.parent !== null && localRowData.parent.toUpperCase() !== "NULL") { localRowData = $grid.jqGrid("getNodeParent", localRowData); $grid.jqGrid("expandRow", localRowData); } // we use scrollrows: true option so the selection below // will scroll the grid to the selected row additionally $grid.jqGrid("setSelection", idToSelect); });