Coloring a row based on column value doesn't work

Coloring a row based on column value doesn't work

peterbelovepeterbelove Posts: 27Questions: 8Answers: 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

This question has accepted answers - jump to:

Answers

This discussion has been closed.