Monday, September 20, 2010

Telerik's RadProgressArea not displaying

We've had a page with a RadProgressArea control on it for some time now, which hasn't always appeared.

After many hours, I've isolated the problem, and it's a wierd one.

With the page class itself was the variable definition

private string UnnamedComponentString = StaticInitializerClass.UnnamedComponentStringInitializationFunction();

I'm not arguing that the above is good code (it really should be initialized in the constructor or the Page_Init rather than at the point of definition) but, to my great surprise, that line was the culprit.

When I change that line to a pure definition and moved the initialization to Page_Init, the RadProgressArea magically appeared! Go figure.

I tried reproducing this in a standalone website as a proof of concept, and it didn't work... so presumably the initialization itself wasn't the problem, it was the interaction between it and something else. Strange, but good to have solved the mystery at last.