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

Binding to LeftDoubleClick

4 Answers 60 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Will
Top achievements
Rank 1
Will asked on 04 Jul 2008, 04:20 PM
It would be useful to be able to bind commands to LeftMouseClick (using RadGridView.InputBindings). For example,

<UI:RadGridView.InputBindings> 
     <MouseBinding Command="{x:Static Entity:EntityCommands.EditCommand}" MouseAction="LeftDoubleClick"/> 
</UI:RadGridView.InputBindings> 


However, it appears that this is not supported, even when the fields are set to readonly.

If I change the above snippet to use MiddleClick, the command is fired.

Is this a bug or intended behaviour?

Many thanks,
 
Will Holley

4 Answers, 1 is accepted

Sort by
0
Accepted
Hristo Deshev
Telerik team
answered on 07 Jul 2008, 11:40 AM
Hello Will,

I don't know what to say here :). Technically setting up InputBindings works when you use a KeyBinding for example. Our GridViewRow templates use a ScrollViewer control that provides support for horizontal scrolling -- that scroll viewer eats up mouse events and prevents the double click mouse binding from triggering its command.

I consider this a bug with RadGridView and we will have to address it for the official release. We either have to get rid of the ScrollViewer controls or kindly ask them not to eat mouse click events. Again, thanks for helping us make our product better. I am updating your Telerik points.

All the best,
Hristo Deshev
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Will
Top achievements
Rank 1
answered on 07 Jul 2008, 11:53 AM
Thanks Hristo,

Would be good if you can find a workaround for the final release - otherwise maybe there's a hack we can do by handling doubleclick events procedurally and forwarding them to commands (yuk...but would work for now)!

Will
0
Hristo Deshev
Telerik team
answered on 07 Jul 2008, 12:00 PM
Hello Will,

The only hack that I can think of right now is to target all ScrollViewer and RadScrollViewer controls with a style and set their Focusable property to false. That will prevent the scroll viewers from eating up click events, but will break inserting new rows using the Insert key. So, if you won't be inserting new rows, just go ahead and try that as a workaround.

Regards,
Hristo Deshev
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Will
Top achievements
Rank 1
answered on 07 Jul 2008, 12:03 PM
Excellent - will try that.

Will
Tags
General Discussions
Asked by
Will
Top achievements
Rank 1
Answers by
Hristo Deshev
Telerik team
Will
Top achievements
Rank 1
Share this question
or