I have a server-side script (PHP) returning JSON data to populate an ExtJS Grid.
This data comes from a MySQL query, containing some NULL values.
When PHP encodes it into the JSON notation, it keeps the NULL intact:
{"id":"33","name":"Test1","url":null,"cls":"x-tree-noicon","expanded":true}
But… when this data is displayed in the ExtJS grid, it shows a “null” string in the place of the NULL value.
I don’t want it to display “null“. I just want it empty (an empty string).
What is the easiest way to achieve this?
Thanks.
I’m not sure if the easiest but the first thing that comes to my mind is creating a custom
renderer. You can use something like this: