Grid Cell Styler Widget - Javascript rule

Hellou Mendixer :-) Im using the Cell Styler Widget from the Marketplace to change the Color of a column, based on the Status. Mendix Marketplace - Grid Cell Styler   so if the Status = new  then the background color should be background-danger. ( later i will need a extra css class but for testing, background-danger is ok)   What im doing wrong in the Javascript rule? The Error: Error while evaluating javascript input: TypeError: Cannot read properties of undefined (reading 'get')    
2 answers

Your contextObj has no attribute with the name ‘New’, therefor it finds no object and thus cannot read properties. Change it to


And if that does not solve it, then you can open the inspector in your browser (F12), find the piece of javascript and debug it.

Or with trial and error attempt to do this first with the most simpel statement:  “return true;”, should turn your cell into background-danger. Then “ return rowObj.get("OrderStatus")==’<yourcellcontents>’, see what happens. And so on.


Hej Tim,

Solved the Problem with 

return rowObj.get("OrderStatus") == "_New";

The underline was missing.


Thanks for you Help

Best Regards