Quantcast
Channel: DataTables 1.10 — DataTables forums
Viewing all articles
Browse latest Browse all 2364

How to select a row by its (displayed) index in an ordered DataTable ?

$
0
0

Hello, I want to be able to select a row in my dataTable using keyboard's arrows (or any other way). I've an index var (let's call it myCursor) going from 0 to DT.page.info().recordsTotal - 1. When i press a key, it updates MyCursor, changes page if needed and now, i want to add a class to the row having myCursor as index.

i wrote DT.row(myCursor).nodes().to$().addClass("myClass");

However, as the table is sorted, myCursor does not correspond to the displayed element.

How should i do to get the displayed row corresponding to myCursor ?

Thx in advance


Viewing all articles
Browse latest Browse all 2364

Trending Articles