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

Advanced scrolling feature based on middle mouse or mousecellclick events

2 Answers 91 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Tegu
Top achievements
Rank 1
Tegu asked on 15 Dec 2017, 02:10 PM

Hello,

I have a flexible sized GridView with a fixed bigger dataset (~50 columns * ~50 rows) and I am looking for any kind of more advanced scrolling behavior than the built in one (which is working well but not an option in my case).

So the layout size is bigger than the visible area and I would like to scroll (or pan-move?) easily inside the grid.

My ideas are 

1. Scrolling fluently both way by pressing the middle mouse button, like on a webpage for example.

2. The cells are in readonly mode, so clicking on a cell while moving the mouse maybe also can be a good option to substitute the scrollbar.

 

Do you have any easy solution for this question or maybe any other advice?

 

2 Answers, 1 is accepted

Sort by
0
Dilyan Traykov
Telerik team
answered on 20 Dec 2017, 10:42 AM
Hello,

There is no straightforward way to achieve the desired behavior, however, you can create a custom attached property to control this and handle the MouseDown and MouseMove events per your liking. In the process, you will need to use RadGridView's GridViewScrollViewer to handle the scrolling.

For your convenience, I'm attaching a small sample project demonstrating a possible approach based on the first idea from your last reply. The second idea can be implemented in a similar fashion.

Please let me know if you find this helpful.

Regards,
Dilyan Traykov
Progress Telerik
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
0
Tegu
Top achievements
Rank 1
answered on 20 Dec 2017, 10:23 PM
Thank you, meanwhile I find a solution.
Tags
GridView
Asked by
Tegu
Top achievements
Rank 1
Answers by
Dilyan Traykov
Telerik team
Tegu
Top achievements
Rank 1
Share this question
or