Null reference unhandled by ScrollingService

2 posts, 0 answers
  1. Lane
    Lane avatar
    1 posts
    Member since:
    Jun 2012

    Posted 01 Nov 2012 Link to this post

    I have a GanttView on a tab control.  After I set the task source for the GanttView I use ScrollingService.ScrollIntoView to scroll the first task in the list into view.  This works great if the GanttView's tab is currently selected and everything is visible.  If the GanttView is not visible it throws a NullReferenceException.  I tried to change the code to only scroll the first task into view on the IsVisibleChanged event.  I still get the same exception.  Is there something else I can check before using ScrollIntoView?

    Below is the top of the stack trace for the exception: 
       at Telerik.Windows.Controls.RadGanttView.<.ctor>b__23()
       at Telerik.Windows.Controls.Gantt.Scrolling.GanttScrollingService.GanttBaseScrollingService.get_ScrollService()
       at Telerik.Windows.Controls.Gantt.Scrolling.GanttScrollingService.GanttBaseScrollingService.GetVerticalCoordinatesToShowIntoView(Object item)
       at Telerik.Windows.Controls.Gantt.Scrolling.GanttScrollingService.GanttBaseScrollingService.CalculateVerticalCoordinates(Object item, VerticalScrollPosition scrollPosition)
       at Telerik.Windows.Controls.Gantt.Scrolling.GanttScrollingService.GanttBaseScrollingService.ScrollToVerticalOffSet(Object item, VerticalScrollPosition scrollPosition, Boolean restricted)
       at Telerik.Windows.Controls.Gantt.Scrolling.GanttScrollingService.ScrollIntoView(Object item, ScrollSettings settings)
       at Telerik.Windows.Controls.Gantt.Scrolling.GanttScrollingService.ScrollIntoView(Object item)

  2. George
    Admin
    George avatar
    1332 posts

    Posted 06 Nov 2012 Link to this post

    Hi Lane,

     
    Thank you for reporting us this exception with the RadGanttView control. We reproduced it on our side and we found the problem - most probably the fix will be included with the next internal build. I am glad to update your telerik points as well.

    Hope this helps.

    All the best,
    George
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. UI for WPF is Visual Studio 2017 Ready
Back to Top