I am currently utilizing JQuery and JGrid in conjunction with Java. I have a grid set up
<script>
jQuery("#table1").jqGrid({
..............
............
});
Additionally, I have another grid
function abc {
var id = firstgridid;
if(number>0) {
// It is working fine but using the previous value
$("#table2").jqGrid('setGridParam', { url: 'JGridA?action=abc&hidden='+id,page:1}).trigger("reloadGrid");
JQuery("#table2").jqGrid({
url:'JGridServlet?action=comm&hidden='+id,
.............
});
}
</script>
Within the second grid, I am passing the selected id value from the first grid as part of the URL. Whenever I choose a row from the first grid and then click on the "show details" button, the function abc() will be executed. The id should be passed along for display of corresponding rows (with id information) in the second grid.
Though I can access the id of the selected row and trigger a reload of the second grid successfully, the query pertaining to the second grid is still using the initially selected id. However, my requirement is to use the presently selected id.
Your assistance would be greatly appreciated.......