createdRow callback - change cell contents based on value of another

createdRow callback - change cell contents based on value of another

neburtonneburton Posts: 63Questions: 6Answers: 0

I need to check the value of one cell in a row and change the html in another cell based.

Could someone explain how to do this or if there is a better way.

'createdRow': function( row, data, dataIndex ) 
{
    if (data['CELL3']==2)
    {
        // code to change html of CELL5
    }
}

Answers

  • colincolin Posts: 15,142Questions: 1Answers: 2,586

    Hi @neburton,

    If I was you, I'd use columns.render. You specifically say which cell you want to change, see the examples on that page, and you also get the entire row data for you to analyse.

    Cheers,

    Colin

This discussion has been closed.