Question

I am looking for a way to add a custom css class to a backend grid cell when it has a specific value.

I know I have the option to use a renderer and I also could use the frameback_call options in addColumns (and of course if I would like to change every row in a column I would just use column_css_class option within addColumn()) but my problem is that these would only give me the possibility to add a div wrapper or something like that. What I really like to do is to add the custom css class to the surrounding td tag. What is the best way to do this?

It seems the problem is that

app/design/adminhtml/default/default/template/widget/grid.phtml

calls

_column->getCssProperty() 

which leads to

\Mage_Adminhtml_Block_Widget_Grid_Column::getCssProperty

which calls

$this->getRenderer()->renderCss();

This leads to

\Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract::renderCss

This has no parameter for $row or similar und does not seem to be able to use row-specific data.

Any ideas?

Thanks in advance! :)

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top