0

I have a cell table that contains Number Columns, added via the GWT Designer plugin for eclipse. These equate to Column<MyObject, Number>(new NumberCell())

I can't figure out how via the API to designate formatting for the cells. The default behavior for integers is to use the a "thousands seperator", e.g. 123456 as 123,456. I want to display just the plain number.

I suppose I could just use a Text column, and frankly, I'm not sure what having a Number Column really buys me, since the column isn't editable (but may be some day), and I have to apply my own Comparator for sorting.

Should I just use a plain text column, or is there a way to specify number formatting on the column?

Stealth Rabbi
  • 10,156
  • 22
  • 100
  • 176

1 Answers1

1

NumberCell uses a NumberFormat to format the number, using the decimal format if none is provided.

You can provide another NumberFormat of your choice, and if it still doesn't fit your needs (you want a plain toString()) you can simply create your own cell inheriting AbstractCell.

Thomas Broyer
  • 64,353
  • 7
  • 91
  • 164
  • I just discovered that in the constructor.. I was looking for mutator methods, not a constructor argument. I ended up using NumberFormat.getFormat("") to do what I needed. – Stealth Rabbi Jan 29 '13 at 16:52