我正在創建一個帶有可編輯字段的jqgrid。我有jqgrid中的2個複選框列,其中一個來自multiselect:true(以獲取唯一的rowId),其他列在列模型內部創建。jqgrid中的多個複選框列。處理onchange事件
我想處理我的列模型中複選框的onchange(checked/unchecked)事件,獨立於其他複選框列(multiselect:true)。任何幫助讚賞。以下是代碼片段。
[{name : "userRole", label: 'OV', width: 40, editable:true, edittype:'checkbox',formatter: 'checkbox', editoptions: {value:"True:False"},
formatoptions: { disabled: false},frozen:true}]
multiselect: true,
onSelectRow: function(rowid){
jQuery(this).editRow(rowid, true);
}
取代在您的colmodel中使用'formatter:'checkbox'',爲複選框定義您自己的'formatter'函數。所以你可以包含你的'onchange'函數。 –