Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    How to override ListGrid cell formatter for only selected fields

    I'm using ListGrid.setCellFormatter() to customize the formatting for a few numeric fields in my grid. But I want the other numeric fields to have the "normal" formatting based on their type (we use a couple of different simple types).

    I have an if statement in my CellFormatter to apply the custom formatting only if the field is one that I want to override, but what do I use for the "else" condition that will invoke the standard formatting?

    As it stands now, I'm just returning value.toString() to format if it isn't one of the "special" fields. How can I use the default formatting for all other fields?

    #2
    The simplest thing is really to add the same numeric formatter at the field level, to each field where you want that formatting.

    Comment

    Working...
    X