Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
515
WebSchedule error when loading Recurrences via CustomDataProvider
posted

Hi,

I am currently trying to implement the WebScheduleInfo control using a custom data provider that inherits from WebScheduleDataProviderBase and implements IDataFetch and IDataUpdate.

I have the following methods that I call from my Fetch handler depending on the Operation type: FetchAppointments(ByVal context as FetchActivitiesContext) and FetchRecurrences(ByVal context As FetchRecurrencesContext), using the following tutorial as my starting point: http://devcenter.infragistics.com/Support/KnowledgeBaseArticle.Aspx?ArticleID=8484

On the database I have implemented the standard set of Infragistics WebSchedule CRUD stored procedures.

If I comment out my FetchRecurrences call in the Fetch handler, I am able to retrieve my Activities (as appointments) from the database and display them in my DayView control. However, when I also fetch Recurrences, I get the following error when the page renders:

Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. 

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
   Infragistics.WebUI.WebSchedule.ScheduleMatrix.LoadActivity(ActivitiesCollection activities) +595
   Infragistics.WebUI.WebSchedule.ScheduleMatrix.VerifyIsUpToDate() +136
   Infragistics.WebUI.WebSchedule.ScheduleMatrix.GetActivityByResourceAndDate(String resourceKey, SmartDate date) +39
   Infragistics.WebUI.WebSchedule.WebScheduleInfo.GetActivitiesForDate(Resource resource, SmartDate startDate) +106
   Infragistics.WebUI.WebSchedule.WebScheduleInfo.OnPreRender(EventArgs e) +332
   System.Web.UI.Control.PreRenderRecursiveInternal() +80
   System.Web.UI.Control.PreRenderRecursiveInternal() +171
   System.Web.UI.Control.PreRenderRecursiveInternal() +171
   System.Web.UI.Control.PreRenderRecursiveInternal() +171
   System.Web.UI.Control.PreRenderRecursiveInternal() +171
   System.Web.UI.Control.PreRenderRecursiveInternal() +171
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +842

Any help getting this problem resolved would be appreciated.

Regards,

John