How to prevent another ajax call when hiding/showing oTable Column
How to prevent another ajax call when hiding/showing oTable Column
NaunihalMaurya
Posts: 1Questions: 1Answers: 0
I am using below method to hide/show the oTable column
function fnHide(iCol) {
/* Get the DataTables object again - this is not a recreation, just a get of the object */
var oTable = $('#companies').dataTable();
//var bVis = oTable.fnSettings().aoColumns[iCol].bVisible;
oTable.fnSetColumnVis(iCol, false);
}
function fnShow(iCol) {
/* Get the DataTables object again - this is not a recreation, just a get of the object */
var oTable = $('#companies').dataTable();
//var bVis = oTable.fnSettings().aoColumns[iCol].bVisible;
oTable.fnSetColumnVis(iCol, true);
}
Its hide/show that column but again it make ajax call to server side.
Number of hiding/showing columns makes that numbers of ajax call.
Please help to prevent ajax call when hiding/showing the column with above function
This discussion has been closed.