fnAddTr - Microsoft JScript runtime error: Object doesn't support this property or method

fnAddTr - Microsoft JScript runtime error: Object doesn't support this property or method

richbuffrichbuff Posts: 6Questions: 0Answers: 0
edited October 2012 in DataTables 1.9
I know this is probably obvious, but... what js file do I need to include to get fnAddTr()?

I am calling it like this:

[code]
var searchRt = $("#visibletable table").dataTable({/* options */});

$("#searchresults table tr").each(function (idx, elem) {
searchRt.fnAddTr($(elem)); // elem is a , add it to existing table
});
[/code]

I am using v1.9.2.

Thanks!
Rich

Replies

  • allanallan Posts: 62,338Questions: 1Answers: 10,228 Site admin
    You need to copy the plug-in code from here: http://datatables.net/plug-ins/api#fnAddTr and put it into your page.

    Worth noting that DataTables 1.10 will support this natively :-)

    Allan
  • richbuffrichbuff Posts: 6Questions: 0Answers: 0
    edited October 2012
    Yes, that did the trick! Thank you - it's working fine now.

    Can't wait for 1.10 :-)
    Rich
  • allanallan Posts: 62,338Questions: 1Answers: 10,228 Site admin
    > Can't wait for 1.10 :-)

    Me neither :-)

    Good to hear you got it going.

    Allan
This discussion has been closed.