我正在尝试使用 jqxgrid 中的复选框打印 jqxgrid 下拉列表值我已经在 jqxgrid 列中绑定 jqxdropdownlist 中的值但是当我尝试使用 checkChange 事件绑定值时出现问题,检查值正在打印但同时事件触发多次我想一次打印一个值,所以请建议我如何执行此操作
我试过这段代码
{
text: 'Sort Type', columntype: 'dropdownlist', datafield: 'aliasname1', width: '11%', editable: true,
createeditor: function (row, cellvalue, editor, celltext, width, height) {
// construct the editor. var requiredfield =
var requiredfield =
[
"Ascending", "Descending", "Unsorted"
];
editor.jqxDropDownList({
checkboxes: true, source: requiredfield, autoDropDownHeight: true, selectedIndex: -1
});
$(document).on('checkChange', function (event) {
var checked = event.args.checked;
var colvalue = $('#shipmentgrid').jqxGrid('getcellvalue', row, 'column');
var tblvalue = $('#shipmentgrid').jqxGrid('getcellvalue', row, 'table');
if (checked == true) {
var textareavalue = $("#txtQueryList").val();
var sortvalues = textareavalue.split('ORDER BY ');
var aa = sortvalues[1];
if (aa != undefined) {
var bb = aa.split(',');
for (i = 0; i < bb.length; i++) {
if (bb[i] != "") {
try {
var s = bb[i];
var t = s;
if (colvalue == t) {
}
else {
var ee = textareavalue + "," + colvalue;
$('#txtQueryList').empty();
$("#txtQueryList").append(ee);
}
}
catch (ex) {
}
}
}
}
else {
$("#txtQueryList").append("\n", "\n", "\n", "ORDER BY", " ", colvalue);
}
}
else {
}
});
}
}