not able to use Datatable API

not able to use Datatable API

jia_khalidjia_khalid Posts: 3Questions: 0Answers: 0

Hi,
I am trying to use Datatable API but the functions i am trying to use are not available for me. I am initializing Datatable on document ready function like this:
var table = $("#exampleTable").Datatable();

and then in an event handler i have evaluated the closet tr and trying to create row on it like this:
var r = table.row(tr); // where tr is the selected row;

Any idea what could be the reason?
I am using jquery.dataTables.min.js v1.9.4

Thanks

Replies

  • allanallan Posts: 63,523Questions: 1Answers: 10,473 Site admin

    Answered your own question:

    I am using jquery.dataTables.min.js v1.9.4

    The row() method was introduced in 1.10. I would suggest updating.

    Allan

  • jia_khalidjia_khalid Posts: 3Questions: 0Answers: 0

    hey, thanks; that was the issue. I have upgraded to 1.10.3 and it worked. It was silly of me. :)

This discussion has been closed.