Change background color of first cells of rows

Change background color of first cells of rows

tnthieutnthieu Posts: 13Questions: 4Answers: 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

Answers

Sign In or Register to comment.