View Full Version : Grid number column dont display zero value

6 Dec 2012, 4:12 AM

I want that the zero-values are not displayed. Is there any possibility to achieve this?
the "renderer" is not available for numbercolumns I think.

Best regards,

6 Dec 2012, 7:47 AM
A numbercolumn just applies a renderer to your column that formats the value as a number. Instead of using a numbercolumn, create the column as a regular column and apply your own renderer that renders the value as a number if it is non-zero and blanks if it is 0.

6 Dec 2012, 7:52 AM
The numbercolumn really is a convienence class, that only contains:
"return Ext.util.Format.number(value, this.format);"

I would move back to a regular column with a custom renderer and just an if (value === 0)

If you need it a lot, you could override and/or extend numbercolumn