I have listing of seller. There are four options:

  • pending
  • approved
  • reject
  • deleted

I want in the grid a column like in indexers for pending it show line green. On rejected it show red whole line.

pending on_________________________________________________________________________________green
Rejected  ____________________________________________________________________________________red  

Just i want to make color code on grid view.
I need to know that how can i make this like , i want.
  • So you want the background color of a line of text to be green or red? – hownowbrowncow Nov 14 '14 at 17:25

I recently needed to do something similar for a client, and this answer https://stackoverflow.com/questions/6569386/approach-on-changing-row-color-on-orders-grid-in-admin and this answer https://stackoverflow.com/questions/13766173/magento-different-background-color-for-group-of-rows-on-backend-grid should cover off what you need. I wanted to colour the entire row (link 1) - it was good grounding, but (link2) - a custom renderer seems to make most sense.


You may have a look at this small extension: https://github.com/luemic/Luemic_GridColor. It colorizes every cell in a grid. The example implementation does it by order status which is nearly the case you need.


Before your event have a call to a javascript function. This function will call the element containing the text you want to change. Have it change the background color. After the event call another javascript function that will change the text background to green.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.