How to change renderer after an event?

Hello,

What is the approach to take if I want to change the cell color of a row after an event? For example, on ‘beforeRemoveRow’, I want to change the color of the row to ‘red’. My app uses EmberJS, but the idea is similar:

 # Custom Renderer
  deleteRowRenderer: (instance, td, row, col, prop, value, cellProperties) ->
    Handsontable.renderers.TextRenderer.apply this, arguments
    td.style.color = 'red'
    td.style.background = '#CEC'
    return
  #
  # Hooks
  handsontable.addHook('beforeRemoveRow', ((index, amount)->
        start = index
        end = index + amount
        for rowNum in [start...end]
          cellMeta = hot.getCellMeta(rowNum)
          # how do i update the renderer here??

          _this.sendAction('beforeRemove', rowNum)
      )
    )

Any help is appreciated! Thanks!

Hi @jhu

Here’s how to pass new renderer to an event: http://jsfiddle.net/zcm3f0zj/
I’m not sure if this is what you wanted.

Yes, that’s what I’m looking for. Thanks!