我用了两个jqgrid。我希望在单击 grid1 中的行时,grid2 通过 Ajax 在 grid1 的基本参数上显示数据。如何通过 Ajax 更改 grid2 的数据?grid2的这段代码:
$("#gridrelatedLette").jqGrid(
{
url: "GetLetterInformationHandler.ashx?CurrentUser=" + 1157 + "&IndCode=" + rowData["PctIndCode"] + "&IndSerial=" + rowData["PctIndNum"] + "&TabName=relatedLetters",
datatype: 'json',
width: $("#relatedLetterTab").width()-20,
height: a1,
direction: "rtl",
colNames: ['1', '2', '2', '3', '4', '5','6',],
colModel: [
{ name: 'IRltType', width: 40, sortable: false, hidden: false, template: CenterTemplate },
{ name: 'IRltLettDate', width: 60, sortable: false, hidden: false, template: CenterTemplate },
{ name: 'IRltLettNum', width: 60, sortable: false, hidden: false, template: CenterTemplate },
{ name: 'IRltLettType', width:30, sortable: false, hidden: false, template: CenterTemplate },
{ name: 'IndTopic', width: 100, sortable: false, hidden: false, template: CenterTemplate },
],
rowNum: 20,
loadonce: true,
rowList: [5, 10, 20],
recordpos: "left",
ignoreCase: true,
toppager: true,
viewrecords: true,
sortorder: "desc",
scrollOffset: 1,
editurl: 'clientArray',
shrinkToFit: true ,
jsonReader:
{
repeatitems: false,
},
rowattr : function(rd) {
return { "class": "myRowClass" };
},
gridview: true,
});