我在表单中有 jqgrid,我希望当用户单击该行时选择该行,但是通过此代码仅选择第一行,当用户单击第 n 行时选择一个。我写这段代码
var gridItem = $('#listItem');
gridItem.jqGrid({
url: 'jQGridHandler.ashx',
postData: { ActionPage: 'ClearanceItems', Action: 'Fill', requestId: rowid },
ajaxGridOptions: { cache: false },
datatype: 'json',
height: 200,
colNames: ['REQUEST_ID','ITEM_NO','GOODS_DESCRIPTION','QUANTITY'],
colModel: [
{ name: 'REQUEST_ID', width: 100, sortable: true },
{ name: 'ITEM_NO', width: 200, sortable: true },
{ name: 'GOODS_DESCRIPTION', width: 100, sortable: true },
{ name: 'QUANTITY', width: 100, sortable: true }
],
gridview: true,
rowNum: 20,
rowList: [20, 40, 60],
pager: '#pagerItem',
viewrecords: true,
sortorder: 'ASC',
rownumbers: true,
});
gridItem.jqGrid('navGrid', '#pagerItem', { add: false, edit: false, del: true }, {}, {},
{}, { multipleSearch: true, overlay: false, width: 460 });
谢谢你的帮助。