Getting column index from sName
Getting column index from sName
Is there an easy way to get the index of a column from the sName of that column?
Something like:
[code]
var oTable = $('#example').dataTable();
var iColIndex = oTable.fnColIndex("exampleColumn");
alert( "Index of column with sName: exampleColumn is: " + iColIndex );
[/code]
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:
[code]
var oTable = $('#example').dataTable();
var iColIndex = oTable.fnColIndex("exampleColumn");
alert( "Index of column with sName: exampleColumn is: " + iColIndex );
[/code]
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!
This discussion has been closed.
Replies
Allan
Do you have any idea when v1.10 might be released?
Thanks again for the response Allan.
Likely January of February. I had hoped for a beta before the new year, but that is looking unlikely with the amount of work piling up at the moment unfortunately. A lot of the work I want to do for 1.10 has actually been done already - the new API is the tick ticket number still to be done... (oh - and redo this web-site :-) ).
Allan