Synchronize Scroll of GantView with other ScrollViewer

3 posts, 1 answers
  1. Julien
    Julien avatar
    20 posts
    Member since:
    Oct 2013

    Posted 21 Nov 2014 Link to this post

    Hello everybody,

    I try to synchronize the scroll into the gantView (the scroll into the panel which show event) with an other scrollViewer outside the ganttView.
    the WrapPanel into scroll Viewer have the same size that event panel in the gantt, ant this panel contains month with same size thant month in the gantView (same number of month in my panel and month in the visible range in the gantt view, month represent by a rectangle and other thing ). The goal is to move scroll in one according to the other, to have the same months showing in the gantView and my panel.
    fo this, I thinking suscribe to the event ScrollChanged in the two controls and work with HorizontalOffset in order to synchronize the two scroll, but I don't find this event in the ganttView.

    Do you think what I try it's possible ?


  2. Answer
    Polya avatar
    190 posts

    Posted 25 Nov 2014 Link to this post

    Hello Julien,

    Internally the RadGanttView contains 3 ScrollBars - 2 horizontal ( for the GridView part and for the TimeRuler part ) and 1 vertical.
    We can get these ScrollBars using the RadGanttView.ChildrenOfType<ScrollBar>() method. We can then use the Value if the TimeRuler area horizontal ScrollBar to scroll some other ScrollViewer with a horizontal offset equal to this Value.
    I've attached a sample project demonstrating this approach. I handle the RadGanttView.SelectionChanged event and in it I scroll a ScrollViewer containing a ListBox with the same offset as the TimeRuler horizontal ScrollBar.

    Hopefully this helps.


    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

  3. DevCraft R3 2016 release webinar banner
  4. Julien
    Julien avatar
    20 posts
    Member since:
    Oct 2013

    Posted 12 Dec 2014 in reply to Polya Link to this post

    OK thanks you it's works perfectly


Back to Top