如何獲取選中行的主鍵集合呢?
使用 getGridParam(selarrrow) 方法可獲取所有選中行的主鍵集合。
注意:此處的主鍵集合是指-設置為主鍵的列(key: true)。再次提醒:一個jqgrid只能設置一個主鍵列
//獲取選中行集合 $("#jqGrid").getGridParam(); //獲取所有選中行主鍵集合 var paras = $("#jqGrid").getGridParam("selarrrow"); alert(paras); //
顯示值如下:
設置其他列為主鍵: