Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WPF > Scheduler > Null reference on RadScheduler

Not answered Null reference on RadScheduler

Feed from this thread
  • Pam avatar

    Posted on Jun 28, 2011 (permalink)

    Hi. When I load the radScheduler and move to the previous week in the week mode view, I got a null reference error.
    My Visual Studio is in Spanish, so I'm putting only the relevant information :
    Error: Null reference on the instanced object
    Source: Telerik.Windows.Controls.Scheduler
    Target site:
    {Telerik.Windows.Controls.Scheduler.TimeSlot SubtractInterval(Telerik.Windows.Controls.Scheduler.IDateSpan, Telerik.Windows.Controls.Scheduler.DateTimeInterval)}

    Stack Trace:
    en Telerik.Windows.Controls.Scheduler.DateSpanExtensions.SubtractInterval(IDateSpan dateSpan, DateTimeInterval dateTimeInterval) en c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\Scheduler\Scheduler\Scheduler\DateSpan\DateSpanExtensions.cs:línea 79
    en Telerik.Windows.Controls.SchedulerViewModel.DecreaseViewDates(DateTimeInterval interval) en c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\Scheduler\Scheduler\View\SchedulerViewModel.cs:línea 215
    en Telerik.Windows.Controls.RadScheduler.DecreaseVisibleDateLarge() en c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\Scheduler\Scheduler\RadScheduler.cs:línea 1513
    en Telerik.Windows.Controls.RadScheduler.OnDecreaseVisibleDateLargeCommand(Object sender, ExecutedRoutedEventArgs e) en c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\Scheduler\Scheduler\RadScheduler.Commands.cs:línea 26
    en System.Windows.Input.CommandBinding.OnExecuted(Object sender, ExecutedRoutedEventArgs e)
    en System.Windows.Input.CommandManager.ExecuteCommandBinding(Object sender, ExecutedRoutedEventArgs e, CommandBinding commandBinding)
    en System.Windows.Input.CommandManager.FindCommandBinding(CommandBindingCollection commandBindings, Object sender, RoutedEventArgs e, ICommand command, Boolean execute)
    en System.Windows.Input.CommandManager.FindCommandBinding(Object sender, RoutedEventArgs e, ICommand command, Boolean execute)
    en System.Windows.Input.CommandManager.OnExecuted(Object sender, ExecutedRoutedEventArgs e)
    en System.Windows.UIElement.OnExecutedThunk(Object sender, ExecutedRoutedEventArgs e)
    en System.Windows.Input.ExecutedRoutedEventArgs.InvokeEventHandler(Delegate genericHandler, Object target)
    en System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
    en System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
    en System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
    en System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
    en System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
    en System.Windows.Input.RoutedCommand.ExecuteImpl(Object parameter, IInputElement target, Boolean userInitiated)
    en System.Windows.Input.RoutedCommand.ExecuteCore(Object parameter, IInputElement target, Boolean userInitiated)
    en MS.Internal.Commands.CommandHelpers.CriticalExecuteCommandSource(ICommandSource commandSource, Boolean userInitiated)
    en System.Windows.Controls.Primitives.ButtonBase.OnClick()
    en System.Windows.Controls.Button.OnClick()
    en Telerik.Windows.Controls.RadButton.OnClick() en c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Core\Controls\Buttons\RadButton.cs:línea 348
    en System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e)
    en System.Windows.UIElement.OnMouseLeftButtonUpThunk(Object sender, MouseButtonEventArgs e)
    en System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
    en System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
    en System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
    en System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
    en System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
    en System.Windows.UIElement.OnMouseUpThunk(Object sender, MouseButtonEventArgs e)
    en System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
    en System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
    en System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
    en System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
    en System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
    en System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
    en System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
    en System.Windows.Input.InputManager.ProcessStagingArea()
    en System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
    en System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
    en System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
    en System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
    en System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
    en MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
    en MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
    en System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
    en MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
    en System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
    en MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
    en MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
    en System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
    en System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
    en System.Windows.Threading.Dispatcher.Run()
    en System.Windows.Application.RunDispatcher(Object ignore)
    en System.Windows.Application.RunInternal(Window window)
    en System.Windows.Application.Run(Window window)
    en System.Windows.Application.Run()
    en Agenda.WPF.App.Main() en C:\Users\ippatena\Documents\Visual Studio 2010\Projects\AgendaWeb\Agenda\Agenda.WPF\obj\x86\Debug\App.g.cs:línea 0
    en System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
    en System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
    en Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
    en System.Threading.ThreadHelper.ThreadStart_Context(Object state)
    en System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
    en System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
    en System.Threading.ThreadHelper.ThreadStart()


    any ideas of what i'm missing?? thanks in advance.

    Reply

  • Yana Yana admin's avatar

    Posted on Jul 1, 2011 (permalink)

    Hi Pam,

    Please send us more details about your scenario as the provided information is not enough for us to reproduce this error.

    Greetings,
    Yana
    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

    Reply

  • Pam avatar

    Posted on Aug 3, 2011 (permalink)

    an apology for the late answer, i been having lots of work.
    The application crashes when someone moves backward or foward on the calendar and when it changes de the view mode.
    Here's a video of how it happens (video link). And this is the xaml of the calendar
    <telerik:RadScheduler telerik:StyleManager.Theme="Office_Blue" x:Name="scheduler" Grid.Row="1" DisplayEmptyGroup="True" OpenModalDialogs="True"
                      AppointmentDeleting="scheduler_AppointmentDeleting"
                        AppointmentCreating="scheduler_AppointmentCreating"
                         AppointmentEditing="scheduler_AppointmentEditing"
                      ViewMode="Week" MonthViewScrollBarVisibility="Collapsed" Margin="-1" Loaded="scheduler_Loaded" ShowsConfirmationWindowOnDelete="False" IsViewModeNavigationEnabled="False" AvailableViewModes="Week" ActiveViewDefinitionChanged="scheduler_ActiveViewDefinitionChanged">
        <telerik:RadScheduler.WeekViewDefinition>
            <telerik:WeekViewDefinition DayEndTime="22:00:00" DayStartTime="08:00:00" TimeSlotLength="00:30:00" />
        </telerik:RadScheduler.WeekViewDefinition>
        <telerik:RadScheduler.DayViewDefinition>
            <telerik:DayViewDefinition TimeSlotLength="00:30:00" DayStartTime="08:00:00" DayEndTime="20:00:00" />
        </telerik:RadScheduler.DayViewDefinition>
    </telerik:RadScheduler>

    Reply

  • Yana Yana admin's avatar

    Posted on Aug 4, 2011 (permalink)

    Hi Pam,

    I've tested the provided code but still cannot observe the issue. It will be really helpful if you could send us a sample project demonstrating the problem.

    Kind regards,
    Yana
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

    Reply

  • Pam avatar

    Posted on Aug 4, 2011 (permalink)

    I figured out what the error was while I was preparing the sample project.
    The error was thrown because of this code line was on UserControl_Loaded function:
    scheduler.SelectedTimeSlot = null;

    Thanks for your help and patience.

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WPF > Scheduler > Null reference on RadScheduler
Related resources for "Null reference on RadScheduler"

WPF Scheduler Features  |  Documentation  |  Demos  |  Telerik TV  |  Self-Paced Trainer  ]