I had the same problem. The workaround I came up with is to set the identifier of the ui object after creation. Then I keep the scrollTop () position before hiding the object. And when I show the object again, I just set scrollTop () to the stored value.
// Set the id of the object if you have multiple objects with the same class if ($("#divScroll").length == 0) { // If the object does not exist with an id $(".ui-jqgrid-bdiv").each(function () { // Select each object via class strID = $(this).attr("id"); // If the current object (selected via class) does not have an id, set id if (strID == undefined || strID == false) { $(this).attr("id", "divScroll"); } }); } // Save the scroll position before hide() intScrollTop = $("#divScroll").scrollTop(); $("#divScroll").hide(); // Set the scroll position to the saved value after show() $("#divScroll").show(); $("#divScroll").scrollTop(intScrollTop);
source share