Binding to LeftDoubleClick

5 posts, 1 answers
  1. Will
    Will avatar
    27 posts
    Member since:
    Jun 2008

    Posted 04 Jul 2008 Link to this post

    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
  2. Answer
    Hristo Deshev
    Admin
    Hristo Deshev avatar
    559 posts

    Posted 07 Jul 2008 Link to this post

    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
  3. Will
    Will avatar
    27 posts
    Member since:
    Jun 2008

    Posted 07 Jul 2008 Link to this post

    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
  4. Hristo Deshev
    Admin
    Hristo Deshev avatar
    559 posts

    Posted 07 Jul 2008 Link to this post

    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
  5. Will
    Will avatar
    27 posts
    Member since:
    Jun 2008

    Posted 07 Jul 2008 Link to this post

    Excellent - will try that.

    Will
Back to Top