how to disable color of class table.dataTable tbody tr

how to disable color of class table.dataTable tbody tr

haffishaffis Posts: 1Questions: 1Answers: 0

i want chow color for just some row like that pleas help

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,455Questions: 1Answers: 10,465 Site admin

    I don't see DataTables or even a table in your HTML, but if you are using DataTables styling, the documentation for this is here.

    Allan

  • rf1234rf1234 Posts: 2,983Questions: 87Answers: 421
    Answer ✓

    https://editor.datatables.net/examples/api/checkbox

    This example could help you.

    You could change this:

    $('input.editor-active', row).prop( 'checked', data.active == 1 );
    

    in a way that you add or remove a font and also use a different event etc..

    I did it myself like this in order to add a different font for certain records:

    rowCallback: function ( row, data ) {
        //rows that aren't done yet are in bold text
            if ( ! $('input.editor-read', row).is( ':checked' ) ) {
    //               $('input.editor-read', row).closest('tr').addClass('fontThick');
               $(row).addClass('fontThick');
            }
        }
    
This discussion has been closed.