Touch support for panning

6 posts, 1 answers
  1. Sehe
    Sehe avatar
    14 posts
    Member since:
    Jun 2011

    Posted 05 Jan 2012 Link to this post

    I was curious if it is possible to add support for touch panning/scrolling to the RadGridView. All of our applications are for touch screens, and touch panning/scrolling would make the RadGridView much easier to use.

    Thank you for the help.

    Scott
  2. Pavel Pavlov
    Admin
    Pavel Pavlov avatar
    2039 posts

    Posted 11 Jan 2012 Link to this post

    Hello Scott,

    Please check this blogpost. It is for Silverlight . However I believe the same approach may be adjusted to WPF as both data grids share the same APi and codebase.

    Greetings,
    Pavel Pavlov
    the Telerik team

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

  3. Sehe
    Sehe avatar
    14 posts
    Member since:
    Jun 2011

    Posted 11 Jan 2012 Link to this post

    I tried using the PanScrollBehavior class in my project, but it doesn't like the following line:

    var contentPanel = this.scrollViewer.FindChildByType<Telerik.Windows.Controls.GridView.ScrollContentPresenter>();


    It cannot find the ScrollContentPresenter. Do you know what the WPF equivalent would be?

    Thanks,
    Scott
  4. Answer
    Sehe
    Sehe avatar
    14 posts
    Member since:
    Jun 2011

    Posted 11 Jan 2012 Link to this post

    After searching the internet for a while, I think I found a really clean way of adding the panning support. Basically you get a pointer to the GridViewScrollViewer and set the panning mode on it.

    GridViewScrollViewer gvsv = this.MyGridView.ChildrenOfType<GridViewScrollViewer>().First();
    if (gvsv != null)
    {
         gvsv.PanningMode = PanningMode.Both;
    }

    This seemed to enable the touch panning for my application. Maybe this is a property you could expose at  the GridView level in future releases.
  5. Pavel Pavlov
    Admin
    Pavel Pavlov avatar
    2039 posts

    Posted 16 Jan 2012 Link to this post

    Hello Scott,

    Yes that is the right solution. It is my mistake not mentioning that the ScrollContentPresenter was substituted by the GridViewScrollViewer recently.

    Thanks for posting the solution to the forum ! I am updating your Telerik points.

    In addition I want to share some good news. We are already working on adding this as a feature of RadGridView. We are aiming at internal support of panning , zooming and some kinetic scrolling.

    Regards,
    Pavel Pavlov
    the Telerik team

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

  6. Alex
    Alex avatar
    2 posts
    Member since:
    Feb 2013

    Posted 21 Feb 2013 Link to this post

    Is there a way to support Drag and Drop in RadTreeView for WPF control?
    Thanks!
Back to Top