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.