NullReference exception in EditAppointment Dialog

2 posts, 0 answers
  1. Patrick
    Patrick avatar
    3 posts
    Member since:
    Oct 2016

    Posted 05 Sep 2017 Link to this post

    Hello Telerik Forum,


    We have a problem in the EditAppointment dialog of the ScheduleView. In ower Software we have two options to view an appointment.

    the first one is over the ScheduleView with wich we have no problems. the second one is over a RadGridView.

    If we open an Appointment over the RadGridView we use:

    "RadScheduleViewCommands.EditAppointment.Execute(appointment, scheduleView);" to get a EditAppointment dialog.

    Now if we change the start- or endtime of the appointment we get an NullReference exception by calling the "DateSpan(IDateSpan)" Constructor. This error occurs only by editing the appointment via RadGridView. So we have no influence by saving the appointment.


    Here is the snippet of the StackTrace where the error appears:

    System.NullReferenceException: object reference not set to an instance of an object.
       bei Telerik.Windows.Controls.ScheduleView.DateSpan..ctor(IDateSpan other)
       bei Telerik.Windows.Controls.ScheduleView.Slot..ctor(IOccurrence occurence)
       bei Telerik.Windows.Controls.ScheduleView.ReadOnlyBehavior.CanEditAppointment(IReadOnlySettings readOnlySettings, IOccurrence occurrence)
       bei Telerik.Windows.Controls.ScheduleView.ReadOnlyBehavior.CanSaveAppointment(IReadOnlySettings readOnlySettings, IOccurrence occurrence)
       bei Telerik.Windows.Controls.ScheduleViewBase.OnAppointmentEditConfirmed(Object sender, EventArgs e)
       bei Telerik.Windows.Controls.SchedulerDialogViewModel.OnConfirmed(EventArgs eventArgs)
       bei Telerik.Windows.Controls.SchedulerDialogViewModel.<OnConfirmCommand>b__0(SchedulerDialogViewModel vm)
       bei Telerik.Windows.Controls.SchedulerDialogViewModel.DoWithViewModel[T](Object sender, Action`1 action)
       bei Telerik.Windows.Controls.SchedulerDialogViewModel.OnConfirmCommand(Object sender, ExecutedRoutedEventArgs e)
       bei System.Windows.Input.CommandBinding.OnExecuted(Object sender, ExecutedRoutedEventArgs e)
       bei System.Windows.Input.CommandManager.ExecuteCommandBinding(Object sender, ExecutedRoutedEventArgs e, CommandBinding commandBinding)
       bei System.Windows.Input.CommandManager.FindCommandBinding(Object sender, RoutedEventArgs e, ICommand command, Boolean execute)
       bei System.Windows.Input.CommandManager.OnExecuted(Object sender, ExecutedRoutedEventArgs e)
       bei System.Windows.UIElement.OnExecutedThunk(Object sender, ExecutedRoutedEventArgs e)
       bei System.Windows.Input.ExecutedRoutedEventArgs.InvokeEventHandler(Delegate genericHandler, Object target)
       bei System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
       bei System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
       bei System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
       bei System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
       bei System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
       bei System.Windows.Input.RoutedCommand.ExecuteImpl(Object parameter, IInputElement target, Boolean userInitiated)
       bei System.Windows.Input.RoutedCommand.ExecuteCore(Object parameter, IInputElement target, Boolean userInitiated)
       bei MS.Internal.Commands.CommandHelpers.CriticalExecuteCommandSource(ICommandSource commandSource, Boolean userInitiated)
       bei System.Windows.Controls.Primitives.ButtonBase.OnClick()
       bei System.Windows.Controls.Button.OnClick()
       bei Telerik.Windows.Controls.RadButton.OnClick() --> LAST USER INTERACTION


    Nice greetings Patrick.


  2. Kalin
    Kalin avatar
    1312 posts

    Posted 08 Sep 2017 Link to this post

    Hi Patrick,

    Can you provide a video of the exact steps that reproduce the issue as we are not aware of such issue? Also if you are able to provide sample runnable project that demonstrates it - we will be glad to further investigate it on our side.

    I'm looking forward to hearing from you.

    Progress Telerik
    Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
Back to Top