fnGetData having trouble when passing in a Row

fnGetData having trouble when passing in a Row

WoahLagWoahLag Posts: 5Questions: 0Answers: 0
edited July 2012 in General
[code]
console.log(_tableSB.$('tr.row_selected'));
console.log(_tableSB.fnGetData(_tableSB.$('tr.row_selected'))) ;
[/code]

I'm passing in a selected row and I could see the row being found by the first line. But when I run the code, I get this error:

[code]
Uncaught TypeError: Cannot call method 'toLowerCase' of undefined
[/code]

Replies

  • WoahLagWoahLag Posts: 5Questions: 0Answers: 0
    Nvm I solved it. It was suppose to be:

    console.log(_tableSB.fnGetData(_tableSB.$('tr.row_selected')[0])) ;

    Since it was passing back an array and I needed the first one found.
  • allanallan Posts: 63,538Questions: 1Answers: 10,476 Site admin
    Yup, the API methods generally expect a node, not a jQuery object. I'm going to look at improving this in 1.10.

    Allan
This discussion has been closed.