scrollTo() specific row in the next pagination
scrollTo() specific row in the next pagination
edos
Posts: 6Questions: 1Answers: 0
i'm already implement the scroller for datatable and want to use scrollTo function
the pagelengthdisplay is 63 and when i do table.row(70).scrollTo(), it can't be done
the function tell that no index was found in the page
when i do table.row(60).scrollTo() it work nicely
how can i make that table.row(70).scrollTo() to work, any solution for this problem
thank you,
edos
This discussion has been closed.
Answers
what am i going to do is
i'm using server side processing
then update specific row (index = 40)
after update, that row will be go to index 70
and after update row complete, i'm using ajax.reload(null,false) to reload the table, coz there is value that empty being filled
so i need to use table.row(70).scrollTo(), but it cant be done
any solution for this problem
thank you,
edos
https://jsfiddle.net/edos/52gk5w4q/19/
i already upload some test, of course it bugged
please look on update() function on jsfiddle, you can look i'm commenting something
thank you,
edos
It doesn't look like your server side response is complete. I don't see the
draw
,recordsTotal
andrecordsFiltered
return parameters as described here:https://datatables.net/manual/server-side#Returned-data
Not returning that info may affect the scroller's ability to request more information from the server.
Kevin
i'm also get to test with client side data for comparison with my server side code
https://jsfiddle.net/edos/kss4vxLv/3/
please look on update() function, i commenting on that function same as my previous jsfiddle
the problem still the same, i need to scroll to certain index after updating 1 row
thank you,
edos
ah sorry i messed up editing my comment, suddenly replaced
oh sorry, i miss that part of parameter, i'd update it
https://jsfiddle.net/edos/52gk5w4q/23/
start
andlength
to my server -> my server give 63 data to the view.table.row(73).scrollTo()
so datatable will scroll to that indexany solution?
thank you,
edos
i get the solution
after exploring the scroller documentation, use
scrollToRow()
function can solve my problemthank you,
edos