Quantcast
Channel: SharePoint » XSLT
Viewing all articles
Browse latest Browse all 6

Proper display of decimal comma in XSLT data view webpart

$
0
0

If you’re having trouble with format-number function in XSLT data view – it’s probably because of decimal comma. The server returns data with decimal comma, and the format-number function works with decimal dot. The workaround is to translate the values

<xsl:value-of select="format-number(translate(translate(@NumberField,’.',’,'),’,',’.'), ‘#.##0,00;-#.##0,00′, ‘lcid1060′)" />

(in the example above the @NumberField represents the internal name of the field that contains numerical value.

Also make sure that in HTML just before the </xsl:stylesheet> tag you have included the following tag:

<xsl:decimal-format decimal-separator="," grouping-separator="." name="lcid1060" />


Viewing all articles
Browse latest Browse all 6

Latest Images

Trending Articles





Latest Images