http://trirand.com/blog/jqgrid/jqgrid.html
jsonReader: {
root: "records",
page: "page", // current page
total: "totalPage", // total pages
records: "total", // total records
repeatitems: false,
id: "alertId"
},
loadBeforeSend: function(jqXHR) {
jqXHR.setRequestHeader("lang",lang);
},
beforeSelectRow: function (rowId, statue, e) {
},
onSelectRow: function (rowId, status, e) {
var rowdata = $("#alerts_grid").getRowData(rowId);
var s = jQuery("#alerts_grid").jqGrid('getGridParam', 'selarrrow');
},
onSelectAll: function (rowId, statue, e) {
},
// 清空所有选中状态
$("#alerts_grid").jqGrid('resetSelection');
$('body').on('click', "#alerts_grid .ui-widget-content", function () {
})
将string数组转换为number数组 :
params.ids = REPORT_ALERTS.aggregationIds.map(Number);
将number数组转换为string数组 :
params.ids = REPORT_ALERTS.aggregationIds.map(String);