Is there an easy way to get the index of a column from the sName of that column?
Something like:
Right now I'm looping through aoColumns looking for the sName that I need which isn't very efficient to do for every time I need the column index. I know I can just create my own array with that data in it but just wondering if there is something already like that.
Thanks in advance!
Something like:
var oTable = $('#example').dataTable(); var iColIndex = oTable.fnColIndex("exampleColumn"); alert( "Index of column with sName: exampleColumn is: " + iColIndex );
Right now I'm looping through aoColumns looking for the sName that I need which isn't very efficient to do for every time I need the column index. I know I can just create my own array with that data in it but just wondering if there is something already like that.
Thanks in advance!