Posted tagged ‘Tip and Trick’

Customize Look And Feel With Calculated Columns

April 14, 2009

Ever wanted to ‘Color Code’ a SharePoint calendar? Or have certain list items display differently then other list items based on their column values?

One of those things that every user needs is the ability to customize the look and feel of many SharePoint elements, and sometimes it just doesn’t make sense to wait for a SharePoint team, developers, or architects to work out a long term solution.

Sometimes you just need a quick and dirty way of doing something as a one off to illustrate a point or to deal with a situation while you work out the full solution.

My favorite ways of dealing with most of these things is the use of codeplex projects, jQuery, javascript, content editor webparts, and SharePoint Designer which I post pretty often about. It’s quick, normally easy to reverse, and can often be managed by a business user.

Another personal favorite of mine is a method that (to my knowledge) Christophe came up with using calculated columns, some conditions, simple HTML and a bit of JavaScript. All of which turns into completely customized (look and feel) views of lists. (Read his original article here:

The concept is simple:
Using SharePoint calculated columns create conditional statements that display different HTML based on the value of the column. Then (because of how it is rendered) use JavaScript to transform the rendered content to it’s equivalent HTML.

The power of this is that it can apply to a great many different scenarios. Take for example one of the common requirements of ‘color coding’ a calendar. In Christopher’s post last november he cleverly illustrates exactly how you could do this with relatively little effort:


This is a simple and effective way to deal with many look and feel issues quickly and easily. If used with a bit of direction this can really help users understand, consume, and review information much more quickly.


(Above image from another example of how it can be used:

Update: Adorable little calculated column builder (based on what I describe in this post) – Could save you a bit of time.

Hopefully with a glance at some of these you can begin to see the usefulness and power such a method can provide for your SharePoint deployment, I know I use it fairly often and I am sure you will too,
Richard Harbridge