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

Touch support for panning

5 Answers 136 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Sehe
Top achievements
Rank 1
Sehe asked on 05 Jan 2012, 11:52 PM
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

5 Answers, 1 is accepted

Sort by
0
Pavel Pavlov
Telerik team
answered on 11 Jan 2012, 10:10 AM
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 >>

0
Sehe
Top achievements
Rank 1
answered on 11 Jan 2012, 05:25 PM
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
0
Accepted
Sehe
Top achievements
Rank 1
answered on 11 Jan 2012, 06:27 PM
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.
0
Pavel Pavlov
Telerik team
answered on 16 Jan 2012, 03:37 PM
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 >>

0
Alex
Top achievements
Rank 1
answered on 21 Feb 2013, 08:57 PM
Is there a way to support Drag and Drop in RadTreeView for WPF control?
Thanks!
Tags
GridView
Asked by
Sehe
Top achievements
Rank 1
Answers by
Pavel Pavlov
Telerik team
Sehe
Top achievements
Rank 1
Alex
Top achievements
Rank 1
Share this question
or