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

Coloring a row based on column value doesn't work

$
0
0

I am trying to highlight a row based on the value of a certain column, but seems like it doesn't.

tried both #1 and #2 but doesn't work, anyone could help?

Many thanks.

     createdRow: function ( row, data, dataIndex ) {
       if ( data[1] == 'Accountant' ) {
         $(row).addClass( 'danger' );
   }

     createdRow: function ( node, data ) {
       if ( data.position == 'Accountant' ) {
         $(node).addClass( 'danger' );
   }

http://live.datatables.net/huzoyaxi/1/edit


Viewing all articles
Browse latest Browse all 82787

Trending Articles



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