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

Change background color of first cells of rows

$
0
0

Hello,

I search for rows whose third column value is equal to 'AAA'

var table = $('#jobs-table').DataTable();

        var indexes = table.rows().eq(0).filter(function (rowIdx) {

            return table.cell(rowIdx, 3).data() == 'AAA'? true : false;
        });

then I want to format the first cell with dard background color. But I don't know why. Could you please help? Here is the code to format the whole row that I found on your website. but I cannot use it to format only the first cell of the rows.

table.rows(indexes)
            .nodes()
            .to$()
            .addClass('bg-dark');

Please help

Thank you


Viewing all articles
Browse latest Browse all 81970

Trending Articles



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