How to change complex header value on rowCallback function

How to change complex header value on rowCallback function

sureshbabuasureshbabua Posts: 2Questions: 1Answers: 0

How to change complex header value on rowCallback function

Answers

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    Hi @sureshbabua ,

    On the rowCallback page, the last example shows how a row cell can be changed, so you could do something similar for a header cell,

    Cheers,

    Colin

  • sureshbabuasureshbabua Posts: 2Questions: 1Answers: 0

    Hi Colin,
    Thank you very much for your response .I'm trying to update first row header dynamically which is not working.Please find the code below

    Status Inactive Inactive Inactive Inactive Inactive Inactive Inactive Inactive Inactive Inactive Inactive Inactive
    Category Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
                    rowCallback: function(row, data, index){
                        if(data.febValue == 5){
                                                 $('thead tr:eq(1) th:eq(2)', row).html('Active');
                                         }
                                   },
    
  • bindridbindrid Posts: 730Questions: 0Answers: 119

    You have it scoped wrong. The row that is in the parameters is a row that is in tbody. So your jQuery is trying to find something in thead (your first parameter) but limit it to searching in row (your second parameter) so it will never be found.

This discussion has been closed.