Problem with RadScheduler recurrence

20 posts, 1 answers
  1. Dan Aucott
    Dan Aucott avatar
    9 posts
    Member since:
    Oct 2009

    Posted 14 Apr 2010 Link to this post

    Hi,

    I'm having some problems working with recurring appointments.  I am currently using the latest Q3 2009 .NET 2.0 version of Telerik, but I have tried the Q1 2010 controls and got the same problems.

    I am recording the RecurrenceRule and RecurrenceParentID in the database, and the calendar entries are appearing on the scheduler properly.  The problem comes when I try to edit.

    By looking at the properties of the appointments as they are created from the data, I have noticed some strange things occurring.

    • The "Master" record, the one with the recurrence rule in it, is created as type Exception in the scheduler.  

    Now, I can override this in the AppointmentCreated event and force it to a RecurrenceState of Master, but then I get other problems:

    • If the type is Master, the "Edit this occurrence" generates an "Object not set to an instance of an object" error.

    I have also found that

    • The "Edit the series" option seems to fail if the RecurrenceParentID value is not set, 

    Which means that you can't edit the series from the master appointment unless you also set the RecurrenceParentID.

    Using the "Reset exceptions" option gives me either:
    1. An "Object reference not set to an instance of an object" error if the RecurrenceParentID is not set on the master, or
    2. If the RecurrenceParentID is set, all occurrences are removed, including the master (presumably because it removes anything with the RecurrenceParentID set to the master value)

    If you can tell me what I might be doing wrong, I would much appreciate it, since no-one else seems to be having these problems!

    I was also having problems with non-recurring appointments being created in the calendar as Exceptions, but I think this is because I was not ensuring the RecurrenceRule was set to Nothing instead of an empty string, and this now works.

    Regards,

    Dan

  2. Peter
    Admin
    Peter avatar
    6637 posts

    Posted 15 Apr 2010 Link to this post

    Hi Dan,

    The behavior which you describe is expected. The reasons for this are explained in the following help topic - Working with Recurring Appointments.

    If you elaborate on what exactly you need to accomplish, we will try to provide you with a solution.

    Best wishes,
    Peter
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Dan Aucott
    Dan Aucott avatar
    9 posts
    Member since:
    Oct 2009

    Posted 15 Apr 2010 Link to this post

    Peter,

    Sorry, but nothing in that page explains the behaviour I'm seeing:

    • The Master record, the one with the recurrence rule, is created as RecurrenceState.Exception, NOT RecurrenceState.Master when the calendar is bound to the data source.
    • I'm getting "Object reference not set to an instance of an object" appearing in a popup window if I try to edit the series from any item in the meeting that doesn't explicitly have a RecurrenceParentID set
    • Reset exceptions fails if the master doesn't have a RecurrenceParentID explicitly set; if it does have that value set then the entire string of appointments is deleted. 

    I should probably also mention that I'm not creating any of these entries programatically, they are all created through the built-in Advanced Form in the scheduler.

    Dan
  5. Answer
    T. Tsonev
    Admin
    T. Tsonev avatar
    2770 posts

    Posted 16 Apr 2010 Link to this post

    Hello Dan,

    The RadScheduler can get confused with the RecurrenceState property if the RecurrenceParentID property is not set to Nothing. Please, make sure that you're setting it to Nothing and not to empty string (similar to RecurrenceRule).

    I hope this helps.

    Best wishes,
    Tsvetomir Tsonev
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  6. Dan Aucott
    Dan Aucott avatar
    9 posts
    Member since:
    Oct 2009

    Posted 24 Apr 2010 Link to this post

    Tvsetomir,

    You're entirely right.  I thought I'd trapped that in code, but it appears I had failed to do so.

    After a very minor change, which ensures that null values from the database come across properly, I appear to have resolved all of my problems.  

    Thank you seems an inadequate response for solving an issue that's been bugging me for over a month, but I'll say it anyway.

    "Thank you"

    Regards,

    Dan
  7. Andrei
    Andrei avatar
    5 posts
    Member since:
    Sep 2010

    Posted 17 Sep 2010 Link to this post

    Hello

    I have the same problems:
    • The Master record, the one with the recurrence rule, is created asRecurrenceState.Exception, NOT RecurrenceState.Master when the calendar is bound to the data source.
    • Non-recurring appointments are created in the calendar as Exceptions

    What do you mean by: "The RadScheduler can get confused with the RecurrenceState property if the RecurrenceParentID property is not set to Nothing" ? something like this: 
            e.Appointment.RecurrenceRule = null;        
            e.Appointment.RecurrenceParentID = null; for the non recuiring appointments and e.Appointment.RecurrenceParentID = null;
    for the recuiring? Because it's not working. Thanks Andrei.
  8. Dan Aucott
    Dan Aucott avatar
    9 posts
    Member since:
    Oct 2009

    Posted 17 Sep 2010 Link to this post

    Andrei,

    It needs to be Nothing, not null.  At least, that was the case in VB.NET, I can't vouch for C#

    Regards,

    Dan.
  9. Andrei
    Andrei avatar
    5 posts
    Member since:
    Sep 2010

    Posted 17 Sep 2010 Link to this post


    As far as I now the "Nothing" from VB.Net for C# is "null", is there anything else like "Nothing" in C#.
  10. Dan Aucott
    Dan Aucott avatar
    9 posts
    Member since:
    Oct 2009

    Posted 17 Sep 2010 Link to this post

    Hi Andrei

    The only thing I can suggest is that the data source you're binding the calendar to doesn't have null in those fields.  In my case I was binding to a list of entries that had been manually read into an object and I was not correctly putting Nothing into the property if the data value from the database was NULL.

    When I read a NULL from the database I was checking it against Nothing (which failed) instead of comparing it against DBNull.Value.  Once I changed my code to populate Nothing into the property if a DBNull.Value was returned for the field, the calendar started working.

    Other than that I'm not sure how much help I can be; I'm not really a C# programmer.

    Regards,

    Dan.
  11. Andrei
    Andrei avatar
    5 posts
    Member since:
    Sep 2010

    Posted 17 Sep 2010 Link to this post

    I am not sending null from database, I did some research on "Nothing" it seems to be like this: For reference types, the C# equivalent of Visual Basic's (VB) Nothing is null. For value types, the equivalent is the default value, e.g., 0, falseetc.

    Can you tell me the default value of the RecurrenceRule? I hope it's not string.Empty because it's not working as well :).
  12. Andrei
    Andrei avatar
    5 posts
    Member since:
    Sep 2010

    Posted 20 Sep 2010 Link to this post

    Hello again.

    If you can't help me with that "Nothing" thing :). maybe you can help with a sample on how the data are extracted from database and bound to the RadScheduler, I am interested in Recurrsive events, of course, because there is something I don't understand about it.
    If you can't get a C# sample then VB wil be good (better than nothing).

    Thank You.
  13. Peter
    Admin
    Peter avatar
    6637 posts

    Posted 22 Sep 2010 Link to this post

    Hi Andrei,

    Please, review the Database structure topic. I hope you find it helpful.


    Greetings,
    Peter
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  14. Andrei
    Andrei avatar
    5 posts
    Member since:
    Sep 2010

    Posted 22 Sep 2010 Link to this post

    Thank you Peter for your reply.

    I found the problem: RecurrenceRule was ok, RecurrenceParentID was the problem. Default for int is "0" but RadScheduler wants "null", otherwise it thinks it is an exception.
  15. Peter
    Admin
    Peter avatar
    6637 posts

    Posted 22 Sep 2010 Link to this post

    Thank you for sharing your finding.

    We are glad that you were able to solve the problem yourself and apologize that we could not help you right away.

    Don't hesitate to contact us if you have other questions.

    Greetings,
    Peter
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  16. Brandon
    Brandon avatar
    16 posts
    Member since:
    May 2009

    Posted 05 Oct 2012 Link to this post

    I'm also having a very similar issue when trying to make an exception to a recurring appointment. One significant difference between the others and I is that I'm using your OpenAccess ORM for my DAL and MySql (against my will, might I add :))

    When I try to DELETE a single occurrence, I get the same error as previously mentioned

    Here's the stack trace for that:

    Exception information:
        Exception type: NullReferenceException
        Exception message: Object reference not set to an instance of an object.
       at Telerik.Web.UI.Scheduling.DataSourceViewSchedulerProvider.OnDataSourceOperationComplete(Int32 count, Exception e)
       at System.Web.UI.DataSourceView.Update(IDictionary keys, IDictionary values, IDictionary oldValues, DataSourceViewOperationCallback callback)
       at Telerik.Web.UI.Scheduling.DataSourceViewSchedulerProvider.Update(RadScheduler owner, Appointment appointmentToUpdate)
       at Telerik.Web.UI.SchedulerProviderBase.Update(ISchedulerInfo schedulerInfo, Appointment appointmentToUpdate)
       at Telerik.Web.UI.Scheduling.AppointmentController.UpdateAppointmentThroughProvider(ISchedulerInfo schedulerInfo, Appointment appointmentToUpdate)
       at Telerik.Web.UI.Scheduling.AppointmentController.DeleteAppointment(Appointment appointmentToDelete, Boolean deleteSeries)
       at Telerik.Web.UI.RadScheduler.DeleteAppointment(Appointment appointmentToDelete)
       at Telerik.Web.UI.RadScheduler.ProcessPostBackCommand(SchedulerPostBackEvent postBack)
       at Telerik.Web.UI.RadScheduler.RaisePostBackEvent(String eventArgument)
       at Telerik.Web.UI.RadScheduler.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
       at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
       at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
       at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

    When I try to EDIT a single occurrence, I get a much different error.

    Here's the stack trace for that:

    Exception information:
        Exception type: InvalidOperationException
        Exception message: An exception occured during the execution of 'Extent<PumpUUp.DAL.AppointmentsUsers>().Where(au => (au.AppointmentId == value(PumpUUp.UI.Scheduler.Default+<>c__DisplayClassd).appointment.Id))'. Failure: Direct client side execution of 'value(PumpUUp.UI.Scheduler.Default+<>c__DisplayClassd).appointment.Id' failed.
    See InnerException for more details.
    Complete Expression:
    .Call System.Linq.Queryable.Where(
        .Constant<Telerik.OpenAccess.Query.ExtentQueryImpl`1[PumpUUp.DAL.AppointmentsUsers]>(Extent<PumpUUp.DAL.AppointmentsUsers>()),
        '(.Lambda #Lambda1<System.Func`2[PumpUUp.DAL.AppointmentsUsers,System.Boolean]>))
     
    .Lambda #Lambda1<System.Func`2[PumpUUp.DAL.AppointmentsUsers,System.Boolean]>(PumpUUp.DAL.AppointmentsUsers $au) {
        $au.AppointmentId == (.Constant<PumpUUp.UI.Scheduler.Default+<>c__DisplayClassd>(PumpUUp.UI.Scheduler.Default+<>c__DisplayClassd).appointment).Id
    }
     
       at Telerik.Web.UI.Scheduling.DataSourceViewSchedulerProvider.OnDataSourceOperationComplete(Int32 count, Exception e)
       at System.Web.UI.DataSourceView.Update(IDictionary keys, IDictionary values, IDictionary oldValues, DataSourceViewOperationCallback callback)
       at Telerik.Web.UI.Scheduling.DataSourceViewSchedulerProvider.Update(RadScheduler owner, Appointment appointmentToUpdate)
       at Telerik.Web.UI.SchedulerProviderBase.Update(ISchedulerInfo schedulerInfo, Appointment appointmentToUpdate)
       at Telerik.Web.UI.Scheduling.AppointmentController.UpdateAppointmentThroughProvider(ISchedulerInfo schedulerInfo, Appointment appointmentToUpdate)
       at Telerik.Web.UI.Scheduling.AppointmentController.AttachRecurrenceException(Appointment parent, Appointment exceptionAppointment, DateTime explicitExceptionDate)
       at Telerik.Web.UI.Scheduling.AppointmentController.UpdateException(Appointment modifiedAppointment, Appointment originalAppointment)
       at Telerik.Web.UI.Scheduling.AppointmentController.UpdateAppointment(ISchedulerInfo schedulerInfo, Appointment originalAppointment, Appointment modifiedAppointment)
       at Telerik.Web.UI.RadScheduler.UpdateAppointmentInline(Boolean removeExceptions)
       at Telerik.Web.UI.RadScheduler.OnBubbleEvent(Object source, EventArgs args)
       at System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args)
       at Telerik.Web.UI.RadButton.OnCommand(ButtonCommandEventArgs e)
       at Telerik.Web.UI.RadButton.RaisePostBackEvent(String eventArgument)
       at Telerik.Web.UI.RadButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
       at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
       at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
       at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
     
    Direct client side execution of 'value(PumpUUp.UI.Scheduler.Default+<>c__DisplayClassd).appointment.Id' failed.
       at Telerik.OpenAccess.Query.LinqExecutor.Execute(Translator translator, Expression expression, Boolean allowHiddenParams)
       at Telerik.OpenAccess.Query.BindingClassifier.VisitMemberAccess(MemberExpression memberExpression, Object context)
       at Telerik.OpenAccess.Query.ExpressionWalker.Visit(Expression exp, Object context)
       at Telerik.OpenAccess.Query.GetObjectByIdDetector.VisitEquals(Expression l, Expression r, Expression m)
       at Telerik.OpenAccess.Query.GetObjectByIdDetector.VisitBinary(BinaryExpression b)
       at IQToolkit.ExpressionVisitor.Visit(Expression exp)
       at Telerik.OpenAccess.Query.GetObjectByIdDetector.Visit(Expression exp)
       at IQToolkit.ExpressionVisitor.VisitLambda(LambdaExpression lambda)
       at Telerik.OpenAccess.Query.GetObjectByIdDetector.VisitLambda(LambdaExpression lambda)
       at IQToolkit.ExpressionVisitor.Visit(Expression exp)
       at Telerik.OpenAccess.Query.GetObjectByIdDetector.Visit(Expression exp)
       at IQToolkit.ExpressionVisitor.VisitUnary(UnaryExpression u)
       at IQToolkit.ExpressionVisitor.Visit(Expression exp)
       at Telerik.OpenAccess.Query.GetObjectByIdDetector.Visit(Expression exp)
       at IQToolkit.ExpressionVisitor.VisitExpressionList(ReadOnlyCollection`1 original)
       at IQToolkit.ExpressionVisitor.VisitMethodCall(MethodCallExpression m)
       at Telerik.OpenAccess.Query.GetObjectByIdDetector.VisitMethodCall(MethodCallExpression m)
       at IQToolkit.ExpressionVisitor.Visit(Expression exp)
       at Telerik.OpenAccess.Query.GetObjectByIdDetector.Visit(Expression exp)
       at Telerik.OpenAccess.Query.GetObjectByIdDetector.Handle(Expression expression, Dictionary`2 parameters, IObjectKeyBuilder builder)
       at Telerik.OpenAccess.Query.ExpressionCompiler.PerformDatabaseQueryImpl(Type type, Int32 elementAt, Object[] groupResolutionParamValues, Boolean single, Boolean checkOid)
       at Telerik.OpenAccess.Query.ExpressionCompiler.PerformDatabaseQuery(Type type, Int32 elementAt, Object[] groupResolutionParamValues, Boolean single, Boolean checkOid)
     
    Non-static method requires a target.
       at System.Reflection.RuntimeMethodInfo.CheckConsistency(Object target)
       at System.Reflection.RuntimeMethodInfo.InvokeArgumentsCheck(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
       at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
       at System.Reflection.RuntimePropertyInfo.GetValue(Object obj, BindingFlags invokeAttr, Binder binder, Object[] index, CultureInfo culture)
       at System.Reflection.RuntimePropertyInfo.GetValue(Object obj, Object[] index)
       at Telerik.OpenAccess.Query.LinqExecutor.VisitMemberAccess(MemberExpression memberExpression, Object ctx)
       at Telerik.OpenAccess.Query.ExpressionWalker.Visit(Expression exp, Object context)
       at Telerik.OpenAccess.Query.LinqExecutor.Execute(Translator translator, Expression expression, Boolean allowHiddenParams)

    When I try to edit the whole series everything works just fine. I've been messing with this for days to no avail. The table structure is defined exactly as you defined in the documentation. I haven't the foggiest notion what could be the problem. Thanks!
  17. Brandon
    Brandon avatar
    16 posts
    Member since:
    May 2009

    Posted 05 Oct 2012 Link to this post

    I'm also having a very similar issue when trying to make an exception to a recurring appointment. One significant difference between the others and I is that I'm using your OpenAccess ORM for my DAL and MySql (against my will, might I add :))

    When I try to DELETE a single occurrence, I get the same error as previously mentioned

    Here's the stack trace for that:

    Exception information:
        Exception type: NullReferenceException
        Exception message: Object reference not set to an instance of an object.
       at Telerik.Web.UI.Scheduling.DataSourceViewSchedulerProvider.OnDataSourceOperationComplete(Int32 count, Exception e)
       at System.Web.UI.DataSourceView.Update(IDictionary keys, IDictionary values, IDictionary oldValues, DataSourceViewOperationCallback callback)
       at Telerik.Web.UI.Scheduling.DataSourceViewSchedulerProvider.Update(RadScheduler owner, Appointment appointmentToUpdate)
       at Telerik.Web.UI.SchedulerProviderBase.Update(ISchedulerInfo schedulerInfo, Appointment appointmentToUpdate)
       at Telerik.Web.UI.Scheduling.AppointmentController.UpdateAppointmentThroughProvider(ISchedulerInfo schedulerInfo, Appointment appointmentToUpdate)
       at Telerik.Web.UI.Scheduling.AppointmentController.DeleteAppointment(Appointment appointmentToDelete, Boolean deleteSeries)
       at Telerik.Web.UI.RadScheduler.DeleteAppointment(Appointment appointmentToDelete)
       at Telerik.Web.UI.RadScheduler.ProcessPostBackCommand(SchedulerPostBackEvent postBack)
       at Telerik.Web.UI.RadScheduler.RaisePostBackEvent(String eventArgument)
       at Telerik.Web.UI.RadScheduler.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
       at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
       at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
       at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

    When I try to EDIT a single occurrence, I get a much different error.

    Here's the stack trace for that:

    Exception information:
        Exception type: InvalidOperationException
        Exception message: An exception occured during the execution of 'Extent<PumpUUp.DAL.AppointmentsUsers>().Where(au => (au.AppointmentId == value(PumpUUp.UI.Scheduler.Default+<>c__DisplayClassd).appointment.Id))'. Failure: Direct client side execution of 'value(PumpUUp.UI.Scheduler.Default+<>c__DisplayClassd).appointment.Id' failed.
    See InnerException for more details.
    Complete Expression:
    .Call System.Linq.Queryable.Where(
        .Constant<Telerik.OpenAccess.Query.ExtentQueryImpl`1[PumpUUp.DAL.AppointmentsUsers]>(Extent<PumpUUp.DAL.AppointmentsUsers>()),
        '(.Lambda #Lambda1<System.Func`2[PumpUUp.DAL.AppointmentsUsers,System.Boolean]>))
     
    .Lambda #Lambda1<System.Func`2[PumpUUp.DAL.AppointmentsUsers,System.Boolean]>(PumpUUp.DAL.AppointmentsUsers $au) {
        $au.AppointmentId == (.Constant<PumpUUp.UI.Scheduler.Default+<>c__DisplayClassd>(PumpUUp.UI.Scheduler.Default+<>c__DisplayClassd).appointment).Id
    }
     
       at Telerik.Web.UI.Scheduling.DataSourceViewSchedulerProvider.OnDataSourceOperationComplete(Int32 count, Exception e)
       at System.Web.UI.DataSourceView.Update(IDictionary keys, IDictionary values, IDictionary oldValues, DataSourceViewOperationCallback callback)
       at Telerik.Web.UI.Scheduling.DataSourceViewSchedulerProvider.Update(RadScheduler owner, Appointment appointmentToUpdate)
       at Telerik.Web.UI.SchedulerProviderBase.Update(ISchedulerInfo schedulerInfo, Appointment appointmentToUpdate)
       at Telerik.Web.UI.Scheduling.AppointmentController.UpdateAppointmentThroughProvider(ISchedulerInfo schedulerInfo, Appointment appointmentToUpdate)
       at Telerik.Web.UI.Scheduling.AppointmentController.AttachRecurrenceException(Appointment parent, Appointment exceptionAppointment, DateTime explicitExceptionDate)
       at Telerik.Web.UI.Scheduling.AppointmentController.UpdateException(Appointment modifiedAppointment, Appointment originalAppointment)
       at Telerik.Web.UI.Scheduling.AppointmentController.UpdateAppointment(ISchedulerInfo schedulerInfo, Appointment originalAppointment, Appointment modifiedAppointment)
       at Telerik.Web.UI.RadScheduler.UpdateAppointmentInline(Boolean removeExceptions)
       at Telerik.Web.UI.RadScheduler.OnBubbleEvent(Object source, EventArgs args)
       at System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args)
       at Telerik.Web.UI.RadButton.OnCommand(ButtonCommandEventArgs e)
       at Telerik.Web.UI.RadButton.RaisePostBackEvent(String eventArgument)
       at Telerik.Web.UI.RadButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
       at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
       at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
       at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
     
    Direct client side execution of 'value(PumpUUp.UI.Scheduler.Default+<>c__DisplayClassd).appointment.Id' failed.
       at Telerik.OpenAccess.Query.LinqExecutor.Execute(Translator translator, Expression expression, Boolean allowHiddenParams)
       at Telerik.OpenAccess.Query.BindingClassifier.VisitMemberAccess(MemberExpression memberExpression, Object context)
       at Telerik.OpenAccess.Query.ExpressionWalker.Visit(Expression exp, Object context)
       at Telerik.OpenAccess.Query.GetObjectByIdDetector.VisitEquals(Expression l, Expression r, Expression m)
       at Telerik.OpenAccess.Query.GetObjectByIdDetector.VisitBinary(BinaryExpression b)
       at IQToolkit.ExpressionVisitor.Visit(Expression exp)
       at Telerik.OpenAccess.Query.GetObjectByIdDetector.Visit(Expression exp)
       at IQToolkit.ExpressionVisitor.VisitLambda(LambdaExpression lambda)
       at Telerik.OpenAccess.Query.GetObjectByIdDetector.VisitLambda(LambdaExpression lambda)
       at IQToolkit.ExpressionVisitor.Visit(Expression exp)
       at Telerik.OpenAccess.Query.GetObjectByIdDetector.Visit(Expression exp)
       at IQToolkit.ExpressionVisitor.VisitUnary(UnaryExpression u)
       at IQToolkit.ExpressionVisitor.Visit(Expression exp)
       at Telerik.OpenAccess.Query.GetObjectByIdDetector.Visit(Expression exp)
       at IQToolkit.ExpressionVisitor.VisitExpressionList(ReadOnlyCollection`1 original)
       at IQToolkit.ExpressionVisitor.VisitMethodCall(MethodCallExpression m)
       at Telerik.OpenAccess.Query.GetObjectByIdDetector.VisitMethodCall(MethodCallExpression m)
       at IQToolkit.ExpressionVisitor.Visit(Expression exp)
       at Telerik.OpenAccess.Query.GetObjectByIdDetector.Visit(Expression exp)
       at Telerik.OpenAccess.Query.GetObjectByIdDetector.Handle(Expression expression, Dictionary`2 parameters, IObjectKeyBuilder builder)
       at Telerik.OpenAccess.Query.ExpressionCompiler.PerformDatabaseQueryImpl(Type type, Int32 elementAt, Object[] groupResolutionParamValues, Boolean single, Boolean checkOid)
       at Telerik.OpenAccess.Query.ExpressionCompiler.PerformDatabaseQuery(Type type, Int32 elementAt, Object[] groupResolutionParamValues, Boolean single, Boolean checkOid)
     
    Non-static method requires a target.
       at System.Reflection.RuntimeMethodInfo.CheckConsistency(Object target)
       at System.Reflection.RuntimeMethodInfo.InvokeArgumentsCheck(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
       at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
       at System.Reflection.RuntimePropertyInfo.GetValue(Object obj, BindingFlags invokeAttr, Binder binder, Object[] index, CultureInfo culture)
       at System.Reflection.RuntimePropertyInfo.GetValue(Object obj, Object[] index)
       at Telerik.OpenAccess.Query.LinqExecutor.VisitMemberAccess(MemberExpression memberExpression, Object ctx)
       at Telerik.OpenAccess.Query.ExpressionWalker.Visit(Expression exp, Object context)
       at Telerik.OpenAccess.Query.LinqExecutor.Execute(Translator translator, Expression expression, Boolean allowHiddenParams)

    When I try to edit the whole series everything works just fine. I've been messing with this for days to no avail. The table structure is defined exactly as you defined in the documentation. I haven't the foggiest notion what could be the problem.
  18. Brandon
    Brandon avatar
    16 posts
    Member since:
    May 2009

    Posted 05 Oct 2012 Link to this post

    I'm also having a very similar issue when trying to make an exception to a recurring appointment. One significant difference between the others and I is that I'm using your OpenAccess ORM for my DAL and MySql (against my will, might I add :))

    When I try to DELETE a single occurrence, I get the same error as previously mentioned

    Here's the stack trace for that:

    Exception information:
        Exception type: NullReferenceException
        Exception message: Object reference not set to an instance of an object.
       at Telerik.Web.UI.Scheduling.DataSourceViewSchedulerProvider.OnDataSourceOperationComplete(Int32 count, Exception e)
       at System.Web.UI.DataSourceView.Update(IDictionary keys, IDictionary values, IDictionary oldValues, DataSourceViewOperationCallback callback)
       at Telerik.Web.UI.Scheduling.DataSourceViewSchedulerProvider.Update(RadScheduler owner, Appointment appointmentToUpdate)
       at Telerik.Web.UI.SchedulerProviderBase.Update(ISchedulerInfo schedulerInfo, Appointment appointmentToUpdate)
       at Telerik.Web.UI.Scheduling.AppointmentController.UpdateAppointmentThroughProvider(ISchedulerInfo schedulerInfo, Appointment appointmentToUpdate)
       at Telerik.Web.UI.Scheduling.AppointmentController.DeleteAppointment(Appointment appointmentToDelete, Boolean deleteSeries)
       at Telerik.Web.UI.RadScheduler.DeleteAppointment(Appointment appointmentToDelete)
       at Telerik.Web.UI.RadScheduler.ProcessPostBackCommand(SchedulerPostBackEvent postBack)
       at Telerik.Web.UI.RadScheduler.RaisePostBackEvent(String eventArgument)
       at Telerik.Web.UI.RadScheduler.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
       at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
       at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
       at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
       
    When I try to EDIT a single occurrence, I get a much different error.

    Here's the stack trace for that:

    Exception information:
        Exception type: InvalidOperationException
        Exception message: An exception occured during the execution of 'Extent<PumpUUp.DAL.AppointmentsUsers>().Where(au => (au.AppointmentId == value(PumpUUp.UI.Scheduler.Default+<>c__DisplayClassd).appointment.Id))'. Failure: Direct client side execution of 'value(PumpUUp.UI.Scheduler.Default+<>c__DisplayClassd).appointment.Id' failed.
    See InnerException for more details.
    Complete Expression:
    .Call System.Linq.Queryable.Where(
        .Constant<Telerik.OpenAccess.Query.ExtentQueryImpl`1[PumpUUp.DAL.AppointmentsUsers]>(Extent<PumpUUp.DAL.AppointmentsUsers>()),
        '(.Lambda #Lambda1<System.Func`2[PumpUUp.DAL.AppointmentsUsers,System.Boolean]>))
     
    .Lambda #Lambda1<System.Func`2[PumpUUp.DAL.AppointmentsUsers,System.Boolean]>(PumpUUp.DAL.AppointmentsUsers $au) {
        $au.AppointmentId == (.Constant<PumpUUp.UI.Scheduler.Default+<>c__DisplayClassd>(PumpUUp.UI.Scheduler.Default+<>c__DisplayClassd).appointment).Id
    }
     
       at Telerik.Web.UI.Scheduling.DataSourceViewSchedulerProvider.OnDataSourceOperationComplete(Int32 count, Exception e)
       at System.Web.UI.DataSourceView.Update(IDictionary keys, IDictionary values, IDictionary oldValues, DataSourceViewOperationCallback callback)
       at Telerik.Web.UI.Scheduling.DataSourceViewSchedulerProvider.Update(RadScheduler owner, Appointment appointmentToUpdate)
       at Telerik.Web.UI.SchedulerProviderBase.Update(ISchedulerInfo schedulerInfo, Appointment appointmentToUpdate)
       at Telerik.Web.UI.Scheduling.AppointmentController.UpdateAppointmentThroughProvider(ISchedulerInfo schedulerInfo, Appointment appointmentToUpdate)
       at Telerik.Web.UI.Scheduling.AppointmentController.AttachRecurrenceException(Appointment parent, Appointment exceptionAppointment, DateTime explicitExceptionDate)
       at Telerik.Web.UI.Scheduling.AppointmentController.UpdateException(Appointment modifiedAppointment, Appointment originalAppointment)
       at Telerik.Web.UI.Scheduling.AppointmentController.UpdateAppointment(ISchedulerInfo schedulerInfo, Appointment originalAppointment, Appointment modifiedAppointment)
       at Telerik.Web.UI.RadScheduler.UpdateAppointmentInline(Boolean removeExceptions)
       at Telerik.Web.UI.RadScheduler.OnBubbleEvent(Object source, EventArgs args)
       at System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args)
       at Telerik.Web.UI.RadButton.OnCommand(ButtonCommandEventArgs e)
       at Telerik.Web.UI.RadButton.RaisePostBackEvent(String eventArgument)
       at Telerik.Web.UI.RadButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
       at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
       at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
       at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
     
    Direct client side execution of 'value(PumpUUp.UI.Scheduler.Default+<>c__DisplayClassd).appointment.Id' failed.
       at Telerik.OpenAccess.Query.LinqExecutor.Execute(Translator translator, Expression expression, Boolean allowHiddenParams)
       at Telerik.OpenAccess.Query.BindingClassifier.VisitMemberAccess(MemberExpression memberExpression, Object context)
       at Telerik.OpenAccess.Query.ExpressionWalker.Visit(Expression exp, Object context)
       at Telerik.OpenAccess.Query.GetObjectByIdDetector.VisitEquals(Expression l, Expression r, Expression m)
       at Telerik.OpenAccess.Query.GetObjectByIdDetector.VisitBinary(BinaryExpression b)
       at IQToolkit.ExpressionVisitor.Visit(Expression exp)
       at Telerik.OpenAccess.Query.GetObjectByIdDetector.Visit(Expression exp)
       at IQToolkit.ExpressionVisitor.VisitLambda(LambdaExpression lambda)
       at Telerik.OpenAccess.Query.GetObjectByIdDetector.VisitLambda(LambdaExpression lambda)
       at IQToolkit.ExpressionVisitor.Visit(Expression exp)
       at Telerik.OpenAccess.Query.GetObjectByIdDetector.Visit(Expression exp)
       at IQToolkit.ExpressionVisitor.VisitUnary(UnaryExpression u)
       at IQToolkit.ExpressionVisitor.Visit(Expression exp)
       at Telerik.OpenAccess.Query.GetObjectByIdDetector.Visit(Expression exp)
       at IQToolkit.ExpressionVisitor.VisitExpressionList(ReadOnlyCollection`1 original)
       at IQToolkit.ExpressionVisitor.VisitMethodCall(MethodCallExpression m)
       at Telerik.OpenAccess.Query.GetObjectByIdDetector.VisitMethodCall(MethodCallExpression m)
       at IQToolkit.ExpressionVisitor.Visit(Expression exp)
       at Telerik.OpenAccess.Query.GetObjectByIdDetector.Visit(Expression exp)
       at Telerik.OpenAccess.Query.GetObjectByIdDetector.Handle(Expression expression, Dictionary`2 parameters, IObjectKeyBuilder builder)
       at Telerik.OpenAccess.Query.ExpressionCompiler.PerformDatabaseQueryImpl(Type type, Int32 elementAt, Object[] groupResolutionParamValues, Boolean single, Boolean checkOid)
       at Telerik.OpenAccess.Query.ExpressionCompiler.PerformDatabaseQuery(Type type, Int32 elementAt, Object[] groupResolutionParamValues, Boolean single, Boolean checkOid)
     
    Non-static method requires a target.
       at System.Reflection.RuntimeMethodInfo.CheckConsistency(Object target)
       at System.Reflection.RuntimeMethodInfo.InvokeArgumentsCheck(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
       at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
       at System.Reflection.RuntimePropertyInfo.GetValue(Object obj, BindingFlags invokeAttr, Binder binder, Object[] index, CultureInfo culture)
       at System.Reflection.RuntimePropertyInfo.GetValue(Object obj, Object[] index)
       at Telerik.OpenAccess.Query.LinqExecutor.VisitMemberAccess(MemberExpression memberExpression, Object ctx)
       at Telerik.OpenAccess.Query.ExpressionWalker.Visit(Expression exp, Object context)
       at Telerik.OpenAccess.Query.LinqExecutor.Execute(Translator translator, Expression expression, Boolean allowHiddenParams)
       
    When I try to edit the whole series everything works just fine. I've been messing with this for days to no avail. The table structure is defined exactly as you defined in the documentation. I haven't the foggiest notion what could be the problem.
  19. Brandon
    Brandon avatar
    16 posts
    Member since:
    May 2009

    Posted 05 Oct 2012 Link to this post

    I'm also having a very similar issue when trying to make an exception to a recurring appointment. One significant difference between the others and I is that I'm using your OpenAccess ORM for my DAL and MySql (against my will, might I add :))

    I'm using version 2012.1.215.40 of the RadControls.

    When I try to DELETE a single occurrence, I get the same error as previously mentioned

    Here's the stack trace for that:

    Exception information:
        Exception type: NullReferenceException
        Exception message: Object reference not set to an instance of an object.
       at Telerik.Web.UI.Scheduling.DataSourceViewSchedulerProvider.OnDataSourceOperationComplete(Int32 count, Exception e)
       at System.Web.UI.DataSourceView.Update(IDictionary keys, IDictionary values, IDictionary oldValues, DataSourceViewOperationCallback callback)
       at Telerik.Web.UI.Scheduling.DataSourceViewSchedulerProvider.Update(RadScheduler owner, Appointment appointmentToUpdate)
       at Telerik.Web.UI.SchedulerProviderBase.Update(ISchedulerInfo schedulerInfo, Appointment appointmentToUpdate)
       at Telerik.Web.UI.Scheduling.AppointmentController.UpdateAppointmentThroughProvider(ISchedulerInfo schedulerInfo, Appointment appointmentToUpdate)
       at Telerik.Web.UI.Scheduling.AppointmentController.DeleteAppointment(Appointment appointmentToDelete, Boolean deleteSeries)
       at Telerik.Web.UI.RadScheduler.DeleteAppointment(Appointment appointmentToDelete)
       at Telerik.Web.UI.RadScheduler.ProcessPostBackCommand(SchedulerPostBackEvent postBack)
       at Telerik.Web.UI.RadScheduler.RaisePostBackEvent(String eventArgument)
       at Telerik.Web.UI.RadScheduler.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
       at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
       at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
       at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

      
    When I try to EDIT a single occurrence, I get a much different error.

    Here's the stack trace for that:

    Exception information:
        Exception type: InvalidOperationException
        Exception message: An exception occured during the execution of 'Extent<PumpUUp.DAL.AppointmentsUsers>().Where(au => (au.AppointmentId == value(PumpUUp.UI.Scheduler.Default+<>c__DisplayClassd).appointment.Id))'. Failure: Direct client side execution of 'value(PumpUUp.UI.Scheduler.Default+<>c__DisplayClassd).appointment.Id' failed.
    See InnerException for more details.
    Complete Expression:
    .Call System.Linq.Queryable.Where(
        .Constant<Telerik.OpenAccess.Query.ExtentQueryImpl`1[PumpUUp.DAL.AppointmentsUsers]>(Extent<PumpUUp.DAL.AppointmentsUsers>()),
        '(.Lambda #Lambda1<System.Func`2[PumpUUp.DAL.AppointmentsUsers,System.Boolean]>))
      
    .Lambda #Lambda1<System.Func`2[PumpUUp.DAL.AppointmentsUsers,System.Boolean]>(PumpUUp.DAL.AppointmentsUsers $au) {
        $au.AppointmentId == (.Constant<PumpUUp.UI.Scheduler.Default+<>c__DisplayClassd>(PumpUUp.UI.Scheduler.Default+<>c__DisplayClassd).appointment).Id
    }
      
       at Telerik.Web.UI.Scheduling.DataSourceViewSchedulerProvider.OnDataSourceOperationComplete(Int32 count, Exception e)
       at System.Web.UI.DataSourceView.Update(IDictionary keys, IDictionary values, IDictionary oldValues, DataSourceViewOperationCallback callback)
       at Telerik.Web.UI.Scheduling.DataSourceViewSchedulerProvider.Update(RadScheduler owner, Appointment appointmentToUpdate)
       at Telerik.Web.UI.SchedulerProviderBase.Update(ISchedulerInfo schedulerInfo, Appointment appointmentToUpdate)
       at Telerik.Web.UI.Scheduling.AppointmentController.UpdateAppointmentThroughProvider(ISchedulerInfo schedulerInfo, Appointment appointmentToUpdate)
       at Telerik.Web.UI.Scheduling.AppointmentController.AttachRecurrenceException(Appointment parent, Appointment exceptionAppointment, DateTime explicitExceptionDate)
       at Telerik.Web.UI.Scheduling.AppointmentController.UpdateException(Appointment modifiedAppointment, Appointment originalAppointment)
       at Telerik.Web.UI.Scheduling.AppointmentController.UpdateAppointment(ISchedulerInfo schedulerInfo, Appointment originalAppointment, Appointment modifiedAppointment)
       at Telerik.Web.UI.RadScheduler.UpdateAppointmentInline(Boolean removeExceptions)
       at Telerik.Web.UI.RadScheduler.OnBubbleEvent(Object source, EventArgs args)
       at System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args)
       at Telerik.Web.UI.RadButton.OnCommand(ButtonCommandEventArgs e)
       at Telerik.Web.UI.RadButton.RaisePostBackEvent(String eventArgument)
       at Telerik.Web.UI.RadButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
       at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
       at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
       at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
      
    Direct client side execution of 'value(PumpUUp.UI.Scheduler.Default+<>c__DisplayClassd).appointment.Id' failed.
       at Telerik.OpenAccess.Query.LinqExecutor.Execute(Translator translator, Expression expression, Boolean allowHiddenParams)
       at Telerik.OpenAccess.Query.BindingClassifier.VisitMemberAccess(MemberExpression memberExpression, Object context)
       at Telerik.OpenAccess.Query.ExpressionWalker.Visit(Expression exp, Object context)
       at Telerik.OpenAccess.Query.GetObjectByIdDetector.VisitEquals(Expression l, Expression r, Expression m)
       at Telerik.OpenAccess.Query.GetObjectByIdDetector.VisitBinary(BinaryExpression b)
       at IQToolkit.ExpressionVisitor.Visit(Expression exp)
       at Telerik.OpenAccess.Query.GetObjectByIdDetector.Visit(Expression exp)
       at IQToolkit.ExpressionVisitor.VisitLambda(LambdaExpression lambda)
       at Telerik.OpenAccess.Query.GetObjectByIdDetector.VisitLambda(LambdaExpression lambda)
       at IQToolkit.ExpressionVisitor.Visit(Expression exp)
       at Telerik.OpenAccess.Query.GetObjectByIdDetector.Visit(Expression exp)
       at IQToolkit.ExpressionVisitor.VisitUnary(UnaryExpression u)
       at IQToolkit.ExpressionVisitor.Visit(Expression exp)
       at Telerik.OpenAccess.Query.GetObjectByIdDetector.Visit(Expression exp)
       at IQToolkit.ExpressionVisitor.VisitExpressionList(ReadOnlyCollection`1 original)
       at IQToolkit.ExpressionVisitor.VisitMethodCall(MethodCallExpression m)
       at Telerik.OpenAccess.Query.GetObjectByIdDetector.VisitMethodCall(MethodCallExpression m)
       at IQToolkit.ExpressionVisitor.Visit(Expression exp)
       at Telerik.OpenAccess.Query.GetObjectByIdDetector.Visit(Expression exp)
       at Telerik.OpenAccess.Query.GetObjectByIdDetector.Handle(Expression expression, Dictionary`2 parameters, IObjectKeyBuilder builder)
       at Telerik.OpenAccess.Query.ExpressionCompiler.PerformDatabaseQueryImpl(Type type, Int32 elementAt, Object[] groupResolutionParamValues, Boolean single, Boolean checkOid)
       at Telerik.OpenAccess.Query.ExpressionCompiler.PerformDatabaseQuery(Type type, Int32 elementAt, Object[] groupResolutionParamValues, Boolean single, Boolean checkOid)
      
    Non-static method requires a target.
       at System.Reflection.RuntimeMethodInfo.CheckConsistency(Object target)
       at System.Reflection.RuntimeMethodInfo.InvokeArgumentsCheck(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
       at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
       at System.Reflection.RuntimePropertyInfo.GetValue(Object obj, BindingFlags invokeAttr, Binder binder, Object[] index, CultureInfo culture)
       at System.Reflection.RuntimePropertyInfo.GetValue(Object obj, Object[] index)
       at Telerik.OpenAccess.Query.LinqExecutor.VisitMemberAccess(MemberExpression memberExpression, Object ctx)
       at Telerik.OpenAccess.Query.ExpressionWalker.Visit(Expression exp, Object context)
       at Telerik.OpenAccess.Query.LinqExecutor.Execute(Translator translator, Expression expression, Boolean allowHiddenParams)

      
    When I try to edit the whole series everything works just fine. I've been messing with this for days to no avail. The table structure is defined exactly as you defined in the documentation. I haven't the foggiest notion what could be the problem.
  20. Brandon
    Brandon avatar
    16 posts
    Member since:
    May 2009

    Posted 09 Oct 2012 Link to this post

    Any ideas?
  21. Plamen
    Admin
    Plamen avatar
    2729 posts

    Posted 10 Oct 2012 Link to this post

    Hi Brandon,

     
    One possible think you can try is to test if the same behavior is observed when you bind the same RadScheduler to a simple DataSource so we can differentiate if the issue is connected with ORM at all. If you still observe the same error please share the code connected with RadScheduler so we can test it locally and be more helpful. 

    Regards,
    Plamen
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017