Thanks param, I updated the grid B as below
Close pop-up section- made below changes: added 2 lines, removed 1 line
=====================
pqIS.init();
pqIS.requestPage = 0;
// $("#grid_popup").pqGrid("destroy");
Open pop-up section: added "refreshDataAndView"
====================
$("#grid_popup").pqGrid("refreshDataAndView");
pop-up section after updating the code:
========================================
$("#transHistoryBtnworkovertime").button().click(function (evt) {
$("#popup")
.dialog({
height: 460,
width: 900,
modal: true,
open: function (evt, ui) {
$("#grid_popup").pqGrid(obj);
$("#grid_popup").pqGrid("refreshDataAndView");
},
close: function () {
pqIS.init();
pqIS.requestPage = 0;
},
show: {
effect: "highlight",
duration: 100
}
}).prev(".ui-dialog-titlebar").css({"background":"#006f66","height":"17px","font-size":"12px","vertical-align":"center"});
}
As expected, I see only new data on the pop-up Grid B
However I see few issues, The first time I click on any new radio button, Grid B works perfectly fine. During subsequent calls,
Issue 1: For Example, If I scroll down to 5 to 10 pages and close pop-up Grid B, the next time when I try to open Grid B with a different record, it makes 2 backend calls to fetch 2 pages instead of 1
Issue 2: Row number column is missing. But I can see row number column when the page loads and I open pop-up for the first time
Issue 3: For some reason, it reached the Error block when I open the pop-up and I see the error message displayed on the screen(But data is getting refreshed)
error: function (jqXHR, textStatus, errorThrown) {
$("#workovertimeResult").text("Failed to Reload Data, Please Try again").css("color", "red");
}
I think all of these are connected to 1 issue. Please let me know if I missed anything or did incorrectly
Attached Updated Grid B code