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

MouseWheel event causing trouble on a column which has RadDropDownButton component in it?

1 Answer 146 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Vladimir
Top achievements
Rank 1
Veteran
Vladimir asked on 26 Aug 2020, 12:31 AM

I have a RadGridView and one of the columns is called "Actions". Basically it contains a RadDropDownButton component which displays a list of actions.

The problem I have is, when I have like 50 rows in the grid, if I click on the RadDropDownButton  in the first row and then by using the mouse wheel to scroll down,

the popup window of the RadDropDownButton stays open and it loads different actions I guess for the elector the mouse wheel got focused afterwards.

 

Can somebody explain me here, what should I do?

Set the SelectedItem of the grid to the mouse wheel row that was focused or hovered?

How to get the row that is being focused or hovered with MouseWheel event?

If I set the SelectedItem to the CurrentItem will this fix my problem?

Why I see CurrentItem and no CurentRow? Because I use older version of WPF Telerid RadGridView?

Could I possibly close the popup window of the RadDropDownButton on the MouseWheel event?

 

Any other info would be useful.

1 Answer, 1 is accepted

Sort by
0
Accepted
Vladimir Stoyanov
Telerik team
answered on 28 Aug 2020, 09:45 AM

Hello Vladimir,

Thank you for the provided information. 

My suggestion would be to close the dropdown in the PreviewMouseWheel event of the RadGridView. In order to do that you can create a property inside your model that would be bound to the IsOpen property of the RadDropDownButton. Then inside the event handler you can iterate the RadGridView ItemsSource collection and set that property to False.

I am attaching a sample project demonstrating what I have in mind. Do check it out and let me know, if it helps.

Regards,
Vladimir Stoyanov
Progress Telerik

Five days of Blazor, Angular, React, and Xamarin experts live-coding on twitch.tv/CodeItLive , special prizes and more, for FREE?! Register now for DevReach 2.0(20).

Tags
GridView
Asked by
Vladimir
Top achievements
Rank 1
Veteran
Answers by
Vladimir Stoyanov
Telerik team
Share this question
or