我必须从 Jqgrid Selected 行中获取值,并使用基于主网格中选定值的数据填充另一个网格。我不想在 Jqgrid 中使用 master detail 或 subgrdi。由于我使用的是 MVC,有没有办法在另一个视图中填充第二个 jqgrid?我无法获取选定行上的列值以将其发布到第二个网格。
这是我的代码
$(document).ready(function() {
$("#UBSImageList").jqGrid({
url: '<%= Url.Content("~/UpdateBatchStatus/UBSDataJson/") %>',
datatype: "json",
mtype: 'POST',
colNames: ['BatchImageName'],
colModel: [
{name:'BatchImageName', index:'BatchImageName', align: 'left', width: 40, editable: false ,sortable: true}
],
rowNum: 20,
rowList: [10, 20, 30, 50],
pager: jQuery('#UBSImagePager'),
viewrecords: true,
imgpath: '<%= Url.Content("~/Content/Scripts/themes/basic/images")%>',
sortname: 'BatchImageName',
sortorder: "asc",
autowidth: true,
caption: 'Client Payor Group',
height: 350
});
$('#UBSImageList').setGridParam({
onSelectRow: function(id) {
window.location = '/UpdateBatchStatus/Details?id=' + id;
}
});
}