Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
255
Rendering a cell value depending on other attributes of the object
posted

Hi,

Suppose you have object of the type

var item = [ { "ID": "4711", "A": "0", "B": "yes" } ]

These objects shall be shown in an igGrid. If A==0 the text "yes" shall be shown in red otherwise in green.

For the column showing B I have specified a formatter (a function). But the formatter only gets the value as the parameter not the entire object so there seems to be no chance to evaluate the value of property A of the current rendered object.

Is there any possibility to access the current rendered object in a formatter. A workaround could be to get the key of the object currently rendered (formatted).

Thanks for your help

Michael

Parents Reply Children
No Data