How to access all columns inside initComplete function ?
How to access all columns inside initComplete function ?
janbugu
Posts: 4Questions: 2Answers: 0
Is there a way to get access to the data table instance inside initComplete function ?
As a example what i want is something like below. Thanks.
var table = $('#example').DataTable({
"initComplete": function(settings, json) {
var columns = columns();
}
This discussion has been closed.
Answers
What is the end goal you are trying to achieve?
Thanks jr42.gordon for the reply. Goal was to apply column search for each column after the table is initialized. found a way out of it by using this.api().columns()
var table = $('#example').DataTable({
"initComplete": function(settings, json) {
var columns = this.api().columns();
}