How can I find the column number using column name

How can I find the column number using column name

polachanpolachan Posts: 101Questions: 50Answers: 0

Is it possible to find the column position number using the column name. For example column 'Position' some times it would be column 0 some time it would be column 2. So How can I find the column number using the column name

$('#example').dataTable( {
"columnDefs": [ {
"targets": [ 0, 2 ],
"orderable": false
} ]
} );

Answers

This discussion has been closed.