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

Select don't mark entire row

$
0
0

Hi.

I have created a table in which I define a background color according to a series of conditions.

Now, when I select a row, only the color is changed, in the column by which I have ordered the data.

It only happens with rows where I have added a bootstrap class.

This is my createdRow function

"createdRow": function (row, data, index){
 if (data['FecLlegada'] == "Sin recibir" ) {
     if (data['lote'] == "-" && data['Guia'] == "N.A." && data['Lot_Asign_SN'] == "N.A.") {
        $(row).addClass("table-primary");
     }
    else {
       $(row).addClass("table-warning"); //$(row).css('background-color', '#fff3cd');
    }
 }
}

I am using the plugins:
- dataTables.select.min.js
- select.bootstrap4.min.js

And the css
- select.bootstrap4.css

Here are some examples of how the table is shown:

Any ideas or information to contribute?

Thanks a lot!!


Viewing all articles
Browse latest Browse all 2364

Trending Articles