fnGetNodes() undefined

fnGetNodes() undefined

AxiAxi Posts: 3Questions: 2Answers: 0

I just updated DataTables from version 1.9.4 to 1.10.0 and found some changes, where I have to change my code.
One thing for example was the aaSorting-attribute.... but that's not the thing....
In my example I iterate through all nodes and get the data of each cell. This was done by the following code:

var objects = _tableObjects.fnGetData();

$(_tableDataPoints.fnGetNodes()).each(function (idx, tr) {

var $tr = $(tr);

//here I get every cells data and push them into an array

}

first thing: fnGetData() --> undefined --> I replaced it with data()
second: fnGetNodes() --> undefined --> now I can't find a similar method for my problem
I thought I can do this with:

var objects = _tableObjects.data();

$(_tableDataPoints.tables().nodes()).each(function (idx, tr) {

//here I only get one node (the last selected or changed)

}

Thank you in advance for any solution
©a-x-i

Answers

  • AxiAxi Posts: 3Questions: 2Answers: 0

    Sorry, I think I was to fast posting my problem, because I just solved it....
    $(_tableDataPoints.rows().nodes()).each(function (idx, tr) {

    ©a-x-i

  • allanallan Posts: 63,491Questions: 1Answers: 10,470 Site admin
    edited May 2014

    Sounds like you are using a DataTables API instance, which does not provide access to the old fn* methods. See the documentation for how to access the API for more information.

    Allan

This discussion has been closed.