Indexing differs in methods row() and indexOf()?

Indexing differs in methods row() and indexOf()?

mencvojmencvoj Posts: 2Questions: 1Answers: 0
edited April 2015 in Free community support

Hi,

in the following piece of code:

                var index = table.column(0).data().indexOf(somethingToFind);
                if (index < 0)
                   trowError("Not found in data table.");

                // find row in datatables with the specified value and toggle the selection on it
                table.row(index).node().to$().toggleClass('active');

indexing of methods indexOf() on column and row() differs - seems like a bug or is it a feature? I could not find any reference to this issue in your documentation ..

Here is a debug info:

> table.column(0).data()
["296789", "297392", "297449"]

> table.rows().data()
[Array[1]0: "296789", Array[1]0: "297392", Array[7]0:"297449"]

>table.row(0).data()
["297449"]

>table.row(1).data()
["296789"]

>table.row(2).data()
["297392"]

Seems quite weird if it is intended to work like that .. working with datatables 1.10.5.

Thank you in advance for your answer.

This discussion has been closed.