Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/typo3/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
jQuery数据表方法fnSetColumnVis未显示复选框_Jquery_Checkbox_Datatable - Fatal编程技术网

jQuery数据表方法fnSetColumnVis未显示复选框

jQuery数据表方法fnSetColumnVis未显示复选框,jquery,checkbox,datatable,Jquery,Checkbox,Datatable,我使用以下datable属性隐藏一列 data.aoColumnDefs = [ { "bVisible": false, "aTargets": [ 9 ] }]; 此列在每行中都有复选框。为了添加复选框,我在每一行调用下面的方法,它工作正常 _buildCheckBox : function() { var newScriptElement = $("<input type='checkbox' class='re-execute-check' />");

我使用以下datable属性隐藏一列

data.aoColumnDefs = [ {
 "bVisible": false, 
 "aTargets": [ 9 ] 
}];
此列在每行中都有复选框。为了添加复选框,我在每一行调用下面的方法,它工作正常

_buildCheckBox : function() {
    var newScriptElement = $("<input type='checkbox' class='re-execute-check' />");
        return $('<div>').append(newScriptElement.eq(0).clone()).html(); 
    }
有了它,我可以看到列,但并没有为每一行显示复选框。还有其他方法吗?

您可以:

使用以下工具绘制表格时渲染复选框:

“mRender”:函数(数据、类型、完整){
返回数据+'';
}


只需在显示隐藏列后调用您的方法

有人能在这个问题上帮忙吗?
 var table = this._resultsTable.dataTable();
 table.fnSetColumnVis(9, true);
"mRender": function (data, type, full) {
     return data + ' <input type='checkbox' class='re-execute-check' />';
}