This is a migrated thread and some comments may be shown as answers.

Null reference unhandled by ScrollingService

1 Answer 100 Views
GanttView
This is a migrated thread and some comments may be shown as answers.
Lane
Top achievements
Rank 1
Lane asked on 01 Nov 2012, 05:19 PM
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)

1 Answer, 1 is accepted

Sort by
0
George
Telerik team
answered on 06 Nov 2012, 03:47 PM
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.

Tags
GanttView
Asked by
Lane
Top achievements
Rank 1
Answers by
George
Telerik team
Share this question
or