View Full Version : newb question : templates and nulls

5 Feb 2012, 1:09 PM
How can i display "nothing" (empty string) instead of null when a value is null, using templates o XTemplates ?

like doing

tpl : "{myField}"

Ext.XTemplate ('{myField}')

if that field has value = null displays null, i want to display nothing, just leave that in blank, like grids does when displaying null values from a store.

Im using Chrome (16.0.912.77) and ExtJs 4.1 Beta 1

6 Feb 2012, 7:20 AM
You can use Ext.util.Format.defaultValue in a member function