How to colour rows based on data value?

How to colour rows based on data value?

shamcashamca Posts: 3Questions: 2Answers: 0

Hi there - Can anyone provide some guidance ? - I want to colour rows based on a data value (1-12). Here's a typical datatable in my application:

$('#itemsDataTable').DataTable({
    "order": [[1, 'desc']],
    "pageLength":15,
    "dom": "Bfrtip",
    "columns": [
        {"width": "30px"},      // item id
        { "width": "30px"},     // take in date - ordered desc
        {"width": "15px"},      // gender
        {"width": "15px"},      // size
        {"width": "15px"},      // type
        {"width": "125px"},     // description
        {"width": "75px"},      // customer name
        {"width": "10px"},      // phone
        {"width": "100px"},    // price
        {"width": "50px"},    // edit button
        {"width": "50px"}     // delete button
    ]
});

Appreciate any help here.

Shaun

This question has an accepted answers - jump to answer

Answers

  • colincolin Posts: 6,896Questions: 0Answers: 1,179
    Answer ✓

    This thread should help, it's asking the same thing.

    Cheers,

    Colin

Sign In or Register to comment.