我有一個jqxGrid,我有幾個複選框英寸 我需要做的是找到一個事件,當複選框被改變時觸發。 我曾嘗試:
jqWidget網格捕獲複選框更改
changed
cellbeginedit
cellendedit
cellvaluechanged
cellvaluechanging
。 一切無濟於事。
我不想在任何單元格發生更改時觸發事件,只是選中此複選框。
關於這可能如何完成的任何想法?
我已經包含下面的代碼。
複選框是「重新證書」線
$("#ModulesGrid").jqxGrid({
width: 890,
height: 350,
theme: modulesTheme,
columnsresize: true,
source: dataAdapter,
pageable: true,
editable: true,
columns: [
{ text: 'Module Name', datafield: 'modulename', width: 100, editable: false },
{ text: 'Optional', datafield: 'Optional', columntype: 'checkbox', width: 100 },
{ text: 'Assigned', datafield: 'Assigned', width: 80 , columntype: 'checkbox'},
{ text: 'Pass', datafield: 'pass',cellsrenderer: radioRenderer,width: 50, editable: false },
{ text: 'NC', datafield: 'nc',cellsrenderer: radioRenderer,width: 50, editable: false },
{ text: 'Fail', datafield: 'fail',cellsrenderer: radioRenderer,width: 50, editable: false },
{ text: 'Re-Cert', datafield: 'recert', columntype: 'checkbox', width: 50, cellvaluechanged: function(event){alert(1);}},
{ text: 'Re-Cert Reason', datafield: 'reason', width: 100, editable: false},
{ text: 'Prior Cert', datafield: 'priorcert', width: 50, editable: false }
]
});
這裏是對API的鏈接:http://www.jqwidgets.com/jquery-widgets-documentation/documentation/jqxgrid/jquery-grid-api.htm
編輯:它不會讓我標記此jqWidget下爲標籤不存在,我沒有1500個代表。對不起,這是混淆。
謝謝Sushanth,我已經刪除了我嘗試過的不同的東西,只是在問題中放置了最新的版本。我的問題是,我只希望爲此特定列捕獲此事件。您提供的解決方案將針對所有更改進行觸發。你認爲有一種方法可以獲得一列的事件嗎? –
@PhilVollhardt ..檢查更新代碼 –
我會試試這個,謝謝Sushanth –