Interactive grid is quite different and typically you don't mess around with the markup directly. IG does not trigger the apexafterrefresh event. This is explained here How to hack APEX Interactive Grid Part 4 – HardLikeSoftware
There is an example of coloring cells based on the data in the IG cookbook that you can get from
See page 12.