Datatable position at a certain row

I would like to be able to position the datatable at a set row. In other words, how do I place the datatable at row 25 or row 32 after it has been loaded.
Errol FarroAsked:
Who is Participating?
 
Rainer JeschorCommented:
And one additional note:
the above option has some issues with the pagination (call it just a bug) if the row value is not the first row of a page (e.g. 10 or 20 ...).
Alternative option is just to go to the correct page:
$('#example').DataTable().page(2).draw(false);

Open in new window

0
 
Rainer JeschorCommented:
Hi,
this can be done through a configuration option:
$('#example').DataTable(
        {
            "displayStart": 24
        });

Open in new window

Remember that in most circumstances counting in JavaScript starts with 0, therefore for row 25 you will have to use 24.
Live sample:
http://jsfiddle.net/EE_RainerJ/q45dtv85/

HTH
Rainer
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.