I have created a Checkbox column using formatter: checkbox and the onCellSelect method is called if I click anywhere on the row, including the outside of the checkbox cell, but not if I click to select the checkbox.
What event is called when the checkbox is selected?
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
$("#dirlist").jqGrid({ url: "gendir2.jim", datatype: "json", mtype: "GET", colModel: [ { name: "mysel", label: '<input type="checkbox" id="cbox" onclick="checkBox(event)" />', width: 20, sortable:false, search: false, formatter: "checkbox", formatoptions: {disabled: false}, }, { name: "title", label: "Directory", width: 250, sorttype: "text", searchoptions: {sopt: ["cn", "bw", "ew"]}, }, { name: "psize", label: "Size", width: 90, align: "right", sorttype: "number", index: "dsize" , searchoptions: {sopt: ["lt", "gt"]}, }, { name: "dsize", hidden: true, width: 90, align: "right", sorttype: "number" }, { name:'flags', label: "Flags", width:30}, { name:'opt', label: "Opt+", width:30, sortable:false, search: false} ], loadonce: true, sortname: "title", viewrecords: true, gridview: true, autoencode: true, altRows: true, sortable: true, treeGrid: true, treeGridModel: 'adjacency', ExpandColumn: 'title', onSelectRow: function(rowid, status, e){ console.log("Row " + rowid + " selected, status " + status ) }, onCellSelect: function(rowid,iCol,cellcontent,e){ console.log("Cell "+ iCol + " Row " + rowid + " selected, content " + cellcontent) }, height: "100%" }) |
Thanks
MymsMan
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top