Table.row() is not a function

Table.row() is not a function

hawkmasterhawkmaster Posts: 56Questions: 20Answers: 0

Hello
I am a beginner to datatables.
I think it is a simple solution :-)

I want to highlight a row programmatically with the rowIndex.
So I found the example
http://datatables.net/reference/type/row-selector

var table = $('#example').DataTable();
var data = table.row( 0 ).data();

But If I put this inside my code I always get the error "Type error table.row() is not a function

What is the problem?

thanks a lot
hans

Answers

  • allanallan Posts: 61,446Questions: 1Answers: 10,054 Site admin

    I suspect you are using $().dataTable() rather than $().DataTable() - see the FAQs.

    Allan

  • hawkmasterhawkmaster Posts: 56Questions: 20Answers: 0

    Dear Allan
    thanks for help.
    I read the API reference and tried both. Like in the Example with
    var table = $('#example').DataTable();
    and with d, like
    var table = $('#example').dataTable();

    but always "table.row() is not a function

    Hans

  • allanallan Posts: 61,446Questions: 1Answers: 10,054 Site admin

    Can you link me to the page so I can debug it please. Without being able to see the code I'm guessing at best.

    Allan

This discussion has been closed.