fnAddData scroll to visible row

fnAddData scroll to visible row

dandandandan Posts: 3Questions: 0Answers: 0
edited September 2010 in General
Hi Allan,
i've enjoyed your DataTables very much, however i've got a small problem. I require to add a row dynamically and everything goes fine, however if in the current view i've more items than the ones set per page (example, i set 10 per page, i've 15 items and add a row), the added row is not visible, i understand that it's sort based, what i'm looking for is a way to "scroll" the table to the correct page (the one with the just added new item), how can i achieve that?
Thanks a million!

Replies

  • dandandandan Posts: 3Questions: 0Answers: 0
    p.s. you can recreate this problem on the add row example
    http://datatables.net/examples/api/add_row.html
    just click 10 times the button to add new rows and the "10th" is not visible 'till you push > or pick a different number of items per page (in which case the problem replicates, just push add new rows more times :) )
    cheers.
  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    There is a plug-in for that: http://datatables.net/plug-ins/api#fnAddDataAndDisplay :-)

    Allan
  • dandandandan Posts: 3Questions: 0Answers: 0
    Ohhh, thanks!
This discussion has been closed.