Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 81970

Cannot select row on another page

$
0
0

Hi everyone,

I'm trying to select the row where I get a positive match but can't seem to gain focus of the row that I match. Below is my code
...
var dtable = $('#datatable').dataTable().api();

        dtable.rows().eq(0).each(function (index) {
            var row = dtable.row(index);
            var data = row.data();

            if (data.Name == 'John') {
                this.addClass("selected");
            }
        ...

I've also tried $(this).closest('tr').addClass('selected') and other variations but haven't had any luck. Any pointers would be greatly appreciated!


Viewing all articles
Browse latest Browse all 81970

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>