Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 82747

How to colour rows based on data value?

$
0
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


Viewing all articles
Browse latest Browse all 82747

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>