3

I have an EditorGrid in which I'm binding data using XML. One of the (non-editable) column (say Quantity) type is float.

Whenever I try to bind XML data with Quantity node as empty, a default value of 0 (zero) is displayed in the Grid. Please note, I'm not setting the 'defaultValue' property for that particular column.

Is there any way, I can prevent the column from displaying 0 (zero) and to render it as Empty cell itself ? I thought about using 'renderer' method, but no use!

Does anyone has encountered the same issue before? How can I render an empty cell in a float column?

Any help will be appreciated. Thanks

abhilashca
  • 249
  • 1
  • 8
  • 21

1 Answers1

6

I've personally never ran into the problem before but one of my coworkers warned me about it. There is a useNull config on Ext.data.Field that should do the trick.

 {name: 'pctChange',  type: 'float', useNull: true}

I tested it out on the array grid sample and it appears to be working as expected.

pllee
  • 3,909
  • 2
  • 30
  • 33