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?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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
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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
jQuery

From novice to tech pro — start learning today.