Home » Sharepoint

sharepoint 2010 calendar list ajax events


it seems that sharepoint 2010 calendar list uses ajax events to navigate between months. my problem is that i want to load some data on month change event and populate it on calendar but i don't know how to hook into these ajax events, if any one knows please help me. what i know it calls some ajax services to change months.


7 Answers Found


Answer 1

Hi Rohit,

The calendar  List  has the webpart (calendar) which renders inside the list. This webpart is ajax  enabled. The navigation (previous/next) month makes the postback n updates the webpart.

Now, what exactly is your requirement. What we want to achive when we click on previous/Next month navigations ?



Answer 2

Thanks your your reply anjali.

problem is that we had developed our custom webpart in SP 2007 which contains calendar  list and added this on SP site. in MOSS it uses to work fine as navigation between months used to cause a full post back to page and our custom data population logic inside webpart was getting executed properly because it was loading entire web part on navigation. however in SP 2010 when we added this webpart first time it works fine because of full post back but when we navigate between months it does not cause load of our webpart and hence we are not able to populate our data in calendar list. i looked through fiddler and it calls .ashx service for navigation between months but i am not sure how to fit my requirement in this. i appreciate it may be due to poor design but i need to make it work in 2010.


Answer 3

Hi Rohit,

In SharePoint 2010,  all WebParts are Ajax enabled, so there won’t be any subsequent postbacks. We have to make changes in our current code to meet with the design of SP 2010

Following seems to be the sequence of the javascript call, when we click on the prev/next navigation (to  switch between months)

function MoveToDate =>Init.js
function CoreInvoke =>Init.js
function _MoveToDate =>core.js
function _MoveToViewDate =>core.js
function AjaxCalendarCall

Now, we need to hook your code, somewhere in these calling methods to know if postback is happening (Make sure we do not change OOB files & do it in a supported way).


Answer 4

Hi Anjali,

thanks a lot for your reply.

could you please suggest some supported ways of doing this?


Answer 5

one more question, can i achieve this if i inherit SPCalendarView and trap this navigation?

Answer 6

Hi Rohit,

I havent tried using the SPCalendarView, so I am not sure about the output. Post the results, in case you get chance to test it. Shall be helpful for further references.



Answer 7

Has anyone been able to successfully do this?

Also I am having an issue manually creating a SPCalendarItemCollection and then binding it as the data source on the SPCalendarView object.  No calendar  events show up.

I am porting a calendar web part over from sharepoint  2007 and was successfully able to do this then.

Also are people having issues with the Ajax calls not working. ie. moving between months and views does not work?

I was able to get it working by adding this script into my webpart but this does not seem like the correct way to go about it.


 private void EnsurePanelFix()


            if (this.Page.Form != null)


                String fixupScript = @"


                     function _initFormActionAjax()


                       if (_spEscapedFormAction == document.forms[0].action)


                         document.forms[0]._initialAction = 




                     var RestoreToOriginalFormActionCore = 


                     RestoreToOriginalFormAction = function()


                       if (_spOriginalFormAction != null)



                         document.forms[0]._initialAction = 





                  typeof(CalendarWidget), "UpdatePanelFixup",

                  fixupScript, true);




I have a shared calendar on SharePoint which is linked into OutLook 2010. When I go to email the calendar using the email icon in Outlook, all of the events are showing up in the body of the email as HTML as expected including recurring events.  Oddly, the ICS calendar that is automatically attached to the email does not show any recurring events. When looking at the Outlook shared calendar, all of the recurring events are displayed as expected. I do not see any settings that are eliminating recurring events so wondering if someone else is having this problem or knows what to do.
how  to debug sharepoint 2010 custom list event reciever using visual studio 2010

Here is the extended Ajax version of Clud Site Events Calendar. 90% complete. It will be finish in the next few days and it will be included on the next release of XDPortal. Enble user to add events private/public.


1) Private/Public event

2) Multiple Event Types

3) Filter event type.

4) Searchable event by event title, start date, user if public.

Screenshot: http://www.ex-designz.net/xdportalscnshots/eventscalendar.gif

Also working on integrating XD Link Directory and user photo album just like www.allrecipe.com to XDPortal.


The new ShrePoint 2010 calendar view provides an hover (mouseover) functionalitiy in the view to add a new item directly from the calendar. I'd like to combine this feature with custom infopath forms for the calendar.

As you may have found out it's not possible to customize the forms of a calender list with infopath 2010. So i created a OOTB custom list, added a start and enddate column, created a calendar view and now a'm able to customize the forms of this list with Infopath 2010. Beautiful...

But wait, when i want to add an item from the calendar view there's no mouseover functionality anymore. Help...

How can i enable the ajax functionality on a calendar view for an OOTB custom list.

Thanks, Marc


Hi All,

I have created List Added Event Handler.

In that Event I want to Add Custom Field in List as List is created.

I get an Error "The Specified Program Requires    a newer version of windows"

Is there ant solution for it.

I have tried it also creating new instances of spweb and spsite rather than getting it from


Saumil Thakkar


hi ;

i would like to ask if i can use event handler with external list(BCS) in SharePoint 2010

like custom list.


i create external content type for table in sql through sharepoint designer then i connect the external list to this content type

now i  need  to create event handler to handle the validation for external list however i investigated few of blogs that said event handler not support the external list is this true ?  





Best Regards



PRB - Cannot deploy VS2010 Event Receiver to custom list in SharePoint-2010 - Error: Operation is not valid due to the current state of the object.

I have a custom list in SharePoint 2010, and I need my VS2010 Event Receiver to be deployed to it.

If I use a built in list type, the Elements.xml file has ListTemplateId="###" and this works. But I need a custom list by its name for which I tried using ListUrl="Lists/~~my-custom-list~~" and I get that above deployment error.

What can I do?


Programmatically Adding a SharePoint Calendar Entry

That is my goal and I am close. I am new to SharePoint and I am using the new approach with DataServiceContext.


            EventCalendarDataContext context = new EventCalendarDataContext(

                    new Uri



            context.Credentials = CredentialCache.DefaultCredentials;


            // Now add a new entry or item

            MyEventCalendarItem item = new MyEventCalendarItem();


            // Populate the list item that I want to add

            item.StatusValue = "Completed";



            // I want to say


            item.Owner = “mydomain\bterkaly”


            // But the system wants UserInformationListItem

            // So I tried this, which still does not work

            // Owner is of type “Person or Group”


            UserInformationListItem theOwner = new UserInformationListItem();

            theOwner.Account = "myDomain\bterkaly";

            item.Owner = theOwner;



                        But it does not work. Any ideas, please?


Hi everybody,

can data from Exchange 2010 be linked in SharePoint 2010. I have list of calendars on Exchange 2010 and I want to link it to one calendar and preview it in SharePoint 2010. Is it possible?

I alo have shared contacts in Exchange 2010 and want to display those contacts on SharePoint. Is there any solution for this?

I see lot of Outlook integration, but not Exchange integration :(.


Hi there,

Is there anyway of disabling the All day Event field in a Calendar list. I don't have the option to hide it either.


Hi all,

I have a remote Web service that connects and queries a sharepoint site collection. One specific query is on a events list. Some of the events are recuring so I want these expanded so I can view the individual instances. I am aware that SPQuery is able to do this, but since this service is remote from the sharepoint server, I have been forced to use the Microsoft.Sharepoint.Client namespace to connect to the site collection.

Does anyone know how I can expand the recurring events without having to write my own code to parse the RecurrenceData field of the event item ?


Hi all,

I have a remote Web service that connects and queries a sharepoint site collection. One specific query is on a events list. Some of the events are recuring so I want these expanded so I can view the individual instances. I am aware that SPQuery is able to do this, but since this service is remote from the sharepoint server, I have been forced to use the Microsoft.Sharepoint.Client namespace to connect to the site collection.

Does anyone know how I can expand the recurring events without having to write my own code to parse the RecurrenceData field of the event item ?


Hi guys,

I need to get all events from a list which are overlap with a range of time (StartDateTime - EndDateTime).

The problem is that recurring events has EventDate as the first day of recurence and EndDate 30 years later so absolutly all ranges of time get into any recurring period.

Is there a way to fix it?



    I've got a problem when trying to view additional calendars through SharePoint that my Exchange server has. The error states:

Could not establish trust relationship for the SSL/TLS secure channel with authority 'myservername.net'. (1b1a6f32-0128-4676-90a1-9501cc6b9805).

I've tried using direct IP addresses instead for the server name with no joy. If i change the calendar path name to use the OWA extensions as (as below) i receive the same error:

Outlook Web Access URL:


Exchange Web Service URL:


I select that the type of calendar is Exchange based and i am using Exchange 2010 SP1. Both servers are running Server 2008 R2 with the latest service pack. I have tried importing root certificates from Exchange to SharePoint server with no joy. Further, i have managed to get SharePoint to send e-mails interfacing directly with Exchange (to specify site group membership etc) so communication is occuring between the two seperate servers.

Any help will be gratefully appreciated.



How can I use SP 2010 calendar overlay feature to display 5 resource room mailboxes? I want my users to use Exchange 2010 resource room mailboxes to schedule rooms using Outlook. How can I add those resource room calendars to a SP 2010 calendar with overlay feature so users have a centralized location to view all 5 mailboxes using overlay feature? Thanks! 

This may be more of a general question, but perhaps someone here can help.

I have a couple dozen sites created from a custom template.  They each include a standard Calendar List.  These calendars are all displaying recurring events as one continuous event from the first occurrence to the last.  If you check the event, the information appears correct, and for that matter, if you connect to the Calendar list from Outlook, the events display correctly there.

I tried creating a new calendar list in these sites and they display recurring events correctly, as distinct occurrences of the series.  The problem is, I've already copied events into the current calendars and would rather avoid recreating all these lists.

Does anyone know of a solution to this problem that doesn't involve re-creating the Calendars?


I'm having trouble getting a list of today's events from a default calendar.

I've tried the following two CAML queries:

 <FieldRef Name=\"EventDate\" />
 <FieldRef Name=\"EndDate\" />
 <FieldRef Name=\"RecurrenceID\" />
 <Value Type=\"DateTime\"><Month/></Value></DateRangesOverlap></Where>

Which resulted in the following Exception:

One or more field types are not installed properly. Go to the list settings page to delete these fields.0x81020014

The calendar list is a default calendar list ie. no additional fields and no changes to the Event content type.

The second CAML query I tried was:


Which worked however it did not include multi-day events that started before today or any recurring events.

Any help would be greatly appreciated!


i have a list on a sharepoint 2007 site and i want to move it to a sharepoint 2010 site. my problem is the items have files attached to them. what would be the best method to do this.

when am copying a date column from list A to List B.

am able to copy the the date but, copied date has date decreased by a day!



List A


Date= 11\26\2010


after coping to

List B


Date = 11\25\2010


any thoughts?

 DateTime dt;
            if (properties.AfterProperties["follow_x0020_Date"] != null)

                item["Status follow up date"] = properties.AfterProperties["follow_x0020_Date"].ToString();
                flag = 1;
                dt = Convert.ToDateTime(properties.ListItem["follow_x0020_Date"]);
                item["Status follow up date"] = dt;


Thanks in advance!



I use Outlook 2007 SP2 to open a WSS 3.0 SP1 calendar. The calendar contains recurring events. When I change one occurence of a recurring event (known as creating a recurrence exception) in Outlook, for example by changing the date of that occurence, the change appears in Outlook but cannot be made to SharePoint, even after manual synchronization. There is no synchronization error reported in Outlook.

The problem occurs only to recurring events that was imported from Exchange server. If event is created in SharePoint, it works fine.

What's more perplexing is the change sometime may propergate to SharePoint. But most of the time failed.

Anyone experiencing the problem? Help to troubleshoot is appreciated! 


<< Previous      Next >>

Microsoft   |   Windows   |   Visual Studio   |   Sharepoint   |   Azure