Get undefined type for row by using "render": function ( data, type, row )

Get undefined type for row by using "render": function ( data, type, row )

191302041191302041 Posts: 4Questions: 3Answers: 0

"render": function ( data, type, row ) {
return data +' ('+ row[0]+')';
},
the row[0] is undefined

Answers

  • allanallan Posts: 61,787Questions: 1Answers: 10,115 Site admin

    Please link to a test case, as per the forum rules. At the moment my guess is that you are using object based data, so accessing array data isn't going to work. But without more information I honestly couldn't say.

    Allan

  • 191302041191302041 Posts: 4Questions: 3Answers: 0

    Thanks for your answer. I resolve it by using row.id instead of row[0]. But I donot no the reason.

    Joey Yao

  • allanallan Posts: 61,787Questions: 1Answers: 10,115 Site admin

    Because row is an object, not an array...!

    Allan

This discussion has been closed.