Coloring a row based on column value doesn't work

Coloring a row based on column value doesn't work

peterbelovepeterbelove Posts: 6Questions: 3Answers: 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

Sign In or Register to comment.