Oskar Zetterberg
Sep 6, 2011
visibility 4462
star star star star star
(0 votes)

Small bug in XFormStatisticsControl

Had a problem where the statistics control didn’t render properly when using StatisticsType N (number). After a bit of digging with reflector it all came down to the priavte method GenerateOutputForNumbers and adding the cssstyle attribute to the panel. The calculated number of em is of type float and when that type is converted to string and the value is decimal it will be rendering a “,” when it should render a “.” as css ain´t to keen on commas.

I had to build my own control inheriting from the original one with this small change to that private method:

panel.Attributes.CssStyle.Add(HtmlTextWriterStyle.Width, num2.ToString().Replace(",", ".") + "em"); instead of panel.Attributes.CssStyle.Add(HtmlTextWriterStyle.Width, num2 + "em");

Sep 06, 2011

Comments

error Please login to comment.
Latest blogs
Stride on SaaS CMS and Frontend Hosting, with Claude Code

This post shows how I set up the Optimizely Stride sample site on a new Optimizely CMS (SaaS) instance. The front end is on Optimizely Frontend...

Minesh Shah (Netcel) | Nov 7, 2026

What changed in Optimizely LanguageManager 5.5.4

LanguageManager 5.5.4 for Optimizely CMS 12 has no public release notes. I compared it to 5.5.3 and found no new features, but an axios upgrade tha...

Tomas Hensrud Gulla | Nov 7, 2026 |

Log your Optimizely Graph queries

Log Graph calls from .NET in in a way where it's easy to copy the query and parameters to GraphiQL.

Johan Kronberg | Nov 6, 2026 |

Introducing Optimizely Feature Flagging: Flag Your Content Model

Feature flag Optimizely CMS content properties without code changes: visibility, validation, editors and whole content types, with any flag provider.

Andy Blyth | Nov 3, 2026 |