HTML Calculated Column: solutions for SP 2010 (Part I)

This series assumes that you are familiar with the “HTML Calculated Column“.

The “HTML Calculated Column” is a powerful method that I created for SharePoint 2003 and 2007. It allows you to display in your SharePoint lists any kind of HTML: color coded text, inline charts, tooltips, embedded videos, etc.
It works in two steps:
1/ Build a HTML string, using a calculated column
2/ Render this HTML string as HTML in SharePoint pages

I am receiving more and more requests from readers who want to use it in SharePoint 2010. As I explained in a previous post, step 2 is tricky in SP 2010, due to asynchronous updates.

At this point, I don’t have a perfect answer, but I figured I’d just start sharing what I have so far. Expect this to be a long series, where I’ll publish updates as and when I validate more options. Your feedback and suggestions will be essential to guide me in my investigations.

For this first post, let’s start with an easy one. In SP 2010 you can disable asynchronous updates for lists:
– Edit Web Part
– uncheck all the AJAX options:

With the AJAX options disabled, the view will behave like it did in SharePoint 2007, and the Text to HTML script will work (well, you tell me…).

Advertisements

15 thoughts on “HTML Calculated Column: solutions for SP 2010 (Part I)

  1. Pingback: HTML Calculated Column: solutions for SP 2010 (Part II) « Path to SharePoint

  2. Pingback: Links (6/15/2010) « Steve Pietrek-Everything SharePoint/Silverlight

  3. Pingback: HTML Calculated Column: solutions for SP 2010 (Part III) « Path to SharePoint

  4. Pingback: HTML Calculated Column: solutions for SP 2010 (Part IV) « Path to SharePoint

  5. Pingback: SharePoint Kaffeetasse 186 - Michael Greth [SharePoint MVP] - SharePointCommunity

  6. Pingback: HTML Calculated Column: solutions for SP 2010 (Part IV) « maiomardesouki

  7. i have an odd issue that i wonder if anyone has seen. i’m using calculated columns for KPI; 1=green, 2=yellow, 3=red (using the text to html method to display the kpi indicators). there are two columns in the list with a KPI value…for some reason, if both values are 2, i cannot view the list item, the browser freezes. there is no other combination where this happens. anyone have any idea why this is happening?

  8. i have an odd issue that i wonder if anyone has seen. i’m using calculated columns for KPI; 1=green, 2=yellow, 3=red (using text to html in a content editor web part to display kpi indicators). there are two columns in the list with a KPI value…for some reason, if both values are 2, i cannot view the list item, the browser freezes. there is no other combination where this happens. anyone have any idea why this is happening?

  9. I actually don’t get an “Ajax” or “Miscelaneous” options… using the feature on a team site!

  10. Pingback: SP « ShowMeTheData

  11. interestingly enough, the AJAX options were all unchecked and we were still seeing that the last expanded group’s HTML was just showing the code. For our site, checking off the Enable Asynchronous Automatic Refresh resolved the issue.

    • i spoke too soon – the above worked until a user clicks on a column header to resort, then it ceases to translate the html into formatting. any advice?

      • Did you try the other options (Part 2, 3 and 4)? With this solution, as the script only runs at page load, subsequent refreshes will keep the raw formatting.

Comments are closed.