col.xyz.formatnumber

Use this property to format a number according to a particular pattern.

Class

column

Property

col.xyz.formatnumber

Formal specification

col.xyz.formatnumber = <pattern>

Required

no

Default

none

Version

1.13

Comment

 * The allowable patterns are specified here. 

  • format conversion is done using the locale of the server

  • formatNumber is only applicable on columns of type number or integer.

  • formatNumber is also applied on the column aggregation (col.xyz.summary)

Example



Assume length = 123.45 (123 meter, 45 centimeter) * col.length.formatnumber = #.## meter returns '123.45 meter' * col.length.formatnumber = ##.### meter returns '123.450 meter' * col.length.formatnumber = #####.000 meter returns '00123.450 meter' * To specify 000s separators use ',' Assume length = 9123.45 meter, col.xyz.formatnumber = as in #,##0.000 meter returns '9,123.450 meter'



Reference

Decimal format specifications

col.xyz.type = number

col.xyz.type = integer

col.xyz.summary

col.xyz.formatnumber.decimalSeparator



Example with a grid used to create a quote



# # Setup grid # gd.columns=itm,product,iDescription,nProducts,unit, linetotal gd.tablename=quotes gd.ds=igridtest   col.itm=Item col.itm.type=sequence col.itm.sequencePrefix=LINE col.itm.width=50 col.product=Product Code col.product.type=list col.product.width=100 col.product.list.size=4 col.product.name1=Consultancy col.product.value1=CONS col.product.name2=License col.product.value2=LIC col.product.name3=Maintenance col.product.value3=MAINT col.product.name4=Installation col.product.value4=INST   col.iDescription=Description col.iDescription.type=textarea col.iDescription.rows=4 col.iDescription.cols=50 col.iDescription.width=250   col.nProducts=Quant col.nProducts.type=number col.nProducts.minValue=1 col.nProducts.maxValue=100 col.nProducts.width=50 col.unit=Unit Price col.unit.type=number col.unit.type.minValue=0 col.unit.width=50   # # Linetotal is calculated from nProducts and Unit, # Formatted using 0.00 EUR #   col.linetotal = Total col.linetotal.type = number col.linetotal.formatNumber = 0.00 EUR col.linetotal.formula = {nProducts} * {unit} col.linetotal.summary = sum