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: 61,446Questions: 1Answers: 10,054 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,801Questions: 85Answers: 406
    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.