Uncaught TypeError: datatable.fnSetColumnVis is not a function

Uncaught TypeError: datatable.fnSetColumnVis is not a function

neenupaul6@gmail.comneenupaul6@gmail.com Posts: 1Questions: 1Answers: 0

My Code Is:

var datatable = $('#adlist').DataTable({
paging: true,
dom: 'T<"clear"><lf<t>ip>',
tableTools: {
"sSwfPath": "/datatable/swf/copy_csv_xls_pdf.swf",
"aButtons": [
{ "sExtends": "print",
"mColumns": [0, 1, 2, 3, 4, 5, 6, 7],
"sMessage": 'Click print or cancel Print',
"fnClick": function (nButton, oConfig, oFlash) {
datatable.fnSetColumnVis(7, false);
$(window).keyup(closePrintView);
}
},
]
}
});
var closePrintView = function (e) {
if (e.which == 27) {
printViewClosed();
}
};
function printViewClosed() {
alert(datatable);
datatable.fnSetColumnVis(7, true);
$(window).unbind('keyup', closePrintView);
}

while clicking on Print button It shows Error : Uncaught TypeError: datatable.fnSetColumnVis is not a function.

Answers

This discussion has been closed.