Announcement

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

    Decimal precision in ListGrid

    I am trying to limit the number of decimals in a number pulled from a datasource in my SmartGWT application.

    I am not sure if I should be doing so in the datasource xml file, in the listgridfield, or where I should be doing it.

    I have a field in my datasource that is of type float

    Code:
    <field name="compensatedValue" type="float" title="Calculated" customSelectExpression="collectedValue * multiplier + offset" />
    Is there an attribute I can use in that code to set it to a maximum of 3 decimal places? Or should it be set somehow in the ListGridField declaration?

    Thanks

    #2
    Anyone? I'm sure this is super simple, but I cannot find good documentation on the XML datasources.

    Comment


      #3
      Make sure to read the QuickStart Guide, as it points out the major sources of documentation - you see possibly unaware that there is comprehensive documentation of all valid .ds.xml attributes. DataSourceField.format is one way to control decimal formatting.

      Comment

      Working...
      X