Scrolling with two grids

2 posts, 0 answers
  1. Keith
    Keith avatar
    88 posts
    Member since:
    May 2007

    Posted 08 Feb 2012 Link to this post


    I've got two TreeListView controls and would like them to be "sync'd" up so that scrolling either grid causes the other to scroll. I've tried to implement the same as we do with the RadGridView but can't get it working (the grd.ChildrenOfType<GridViewScrollViewer> always returns NULL). Is this possible and if so how?

  2. Nick
    Nick avatar
    593 posts

    Posted 09 Feb 2012 Link to this post

    Hello Keith,

    It is possible that you are trying to get the ScrollViewer before it has been created. That is why you get a null reference. You can try getting it in some of the events that fire after the TreeList components have been created i.e. the RowLoadedEvent. Mind however that Synchronous scrolling in two or more TreeLists can be tricky i.e. if one of the Lists has more expanded nodes than the other. You will have to think of a way to handle such scenarios.

    Hope this helps!  

    All the best,
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Back to Top