Pages

22 January, 2013

Color Calendar Events by column value

First Happy New Year for everyone, hope you've all had a wonderful holiday season.

To start 2013 I bring, how to create a very nice feature for Sharepoint Calendars. How to present events with diferent colors based on a column value. There are already some nices scripts over the web on how to achieve these.Yet I tried to simplify the all procedure for easy deploy.

I'll be using a standard calendar list and will repaint the events based on the Category field. The default available values are:
  • Meeting
  • Work hours
  • Business
  • Holiday
  • Get-together
  • Gifts
  • Birthday
  • Anniversary
But you can use any other column you like.

The goal is to associate some CSS styles to each category, present the field in the calendar event title, grab it and apply the associated CSS.

Before you start, download and the following files https://docs.google.com/file/d/0BzBaIn5fuGosNnJOV2ZSRVZDYmc/edit

Now that you have the files lets do it.

12 December, 2012

Master Detail in Sharepoint (2/2)

Ok, back to continue the article about creating Master Detail relationship in Sharepoint 2010.
In my previous post Master Detail in Sharepoint (1/2) I've shown you how to prepare the Master forms in order to view the Details of a Master item.

Now you need to tweak a bit the Details table form, in order to provide an easy way for the end user to add and update Detail items. Check it out how in this article.

01 December, 2012

Master Detail in Sharepoint (1/2)

Once again I say hi to my followers and Sharepoint fellows. Today I woke up with an urge to write about something that is always a pain in Sharepoint. The Master/Detail thing.

There is no direct way to implement a Master/Detail scenario in Sharepoint, yet I've been using a technique that is pretty simple to implement and very easy for the end user to understand.

As this requires some work, I decided to split it into two articles.

1. Create the Master/Detail relation and Master Forms
2. Update the new (Detail) item link and Detail Forms.


So in this article, I will show you how to create the Master/Detail relation and change the Master Table Forms to reflect it. Check it out how.

17 November, 2012

Get parent Summary Task and children tasks

Good evening people, this week I've faced some nice challenge in Sharepoint 2010. Working with a Task, I needed to get the parent Summary Task of Task after it was added, changed or deleted, in order to update that same Summary Task with information about its children tasks.

It took me a few hours to solve this problem, yet solved it with a simple solution. Keep reading :)

14 November, 2012

Add summary task to task list programatically

Hello again, recently I've tried to add a summary task in a task list in an event receiver.
For my surprise that turned out to be more difficult then I initially expected. Nevertheless, the solution is pretty simple.

Check it out

11 September, 2012

Dismistifying AfterProperties & BeforeProperties

Hi folks, just logged for a fast writing. Everytime I need to code an event receiver I always face the problem of what to use in order to get the Changed Values and Original Values of the event Item.

Guess we all know the:

  • SPItemEventProperties.AfterProperties
  • SPItemEventProperties.BeforeProperties
  • SPItemEventProperties.ListItem
The pain is to understand what values this properties contain in each of the events of a List or Library.
Did some debugging and found nothing new, yet with a small trick in Library events.

Check it out ...

23 August, 2012

Removing HTML tags from Drop Down list

Hi people, got another tweak to show you.

Following a previous post Filtering lookup columns I've noticed that the selected value of a DropDown list shows HTML tags like this:


Nevertheless the items in the dropdown list are ok.


The question is, how to remove the HTML tags from the selected value?