Try our conversational search powered by Generative AI!

Oskar Zetterberg
Sep 6, 2011
  3797
(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

Please login to comment.
Latest blogs
Product Listing Page - using Graph

Optimizely Graph makes it possible to query your data in an advanced way, by using GraphQL. Querying data, using facets and search phrases, is very...

Jonas Bergqvist | Jul 5, 2024

Optimizely Search and Navigation - Part 2 - Filter Tips

Introduction Continuing from Part 1 – Search Tips , today I will share the next part – filter tips. The platform versions used for this article are...

Binh Nguyen Thi | Jul 1, 2024

Integrating HubSpot CRM without the MA Connector

Have HubSpot CRM? Want to push user data into it from Optimizely? Don’t have any personalisation requirements with that data? Don’t want to pay $80...

Matt Pallatt | Jun 27, 2024

Keeping the website secure by updating external packages

Did you see the latest warning from Optimizely to update this package with a critical security warning? https://world.optimizely.com/documentation/...

Daniel Ovaska | Jun 27, 2024

Optimizely CMS image anonymization now available for Linux!

The famous image anonymization add-on for Optimizely CMS, with at least 5 downloads, is now finally available for use on Linux. Supports simultaneo...

Tomas Hensrud Gulla | Jun 25, 2024 | Syndicated blog

Remove a segment from the URL in CMS 12

Problem : I have created thousands of pages dynamically using schedule jobs with different templates (e.g. one column, two columns, etc..) and stor...

Sanjay Kumar | Jun 21, 2024