jump to a specific row by value (string) when first instantiating the table
jump to a specific row by value (string) when first instantiating the table
mustafamond
Posts: 40Questions: 11Answers: 0
Is there a way to initialize a scrollable table and scroll to a specific row based on the string value of one of the fields in that row so that when the table is first displayed, the row with that value is showing at the top of the visible window?
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Are you using the Scroller extension? If so then
row().scrollTo()
should work. You can do something like this with therow()
row-selector
as a function:http://live.datatables.net/navobusu/1/edit
Kevin
Yes, this works, thank you.
must specify
"scroller";true,
when initializing the datatable. After initialization,
$("#table_id").DataTable().row("#row_id").scrollTo();
does the trick