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

[Solved] No more MouseLeftButtonDown event in Q3

3 Answers 104 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Gerry
Top achievements
Rank 1
Gerry asked on 25 Nov 2009, 12:25 PM
The MouseLeftButtonDown event for a RadGridView could be captured in Q2, but does not fire anymore in Q3. Looks like it is intercepted by Telerik. It is not replaced by any other event either.

I used the MouseLeftButtonDown event to allow a user to click on a row of the gird that displayed customers. Then I would give him a function selection page, where he could select a function to be performed for the customer he clicked.

In actual fact I used the MouseLeftButtonDown event with a timer to simulate a double-click. The user could double click on a row of the customer table displayed in a RadGridView and then I would give him a function selection for the customer he picked.

Now I have no idea how to do this in Q3. Can you help? Is this a bug in Q3?

3 Answers, 1 is accepted

Sort by
0
Accepted
Milan
Telerik team
answered on 25 Nov 2009, 12:48 PM
Hi Gerold,

You could find more information about this topic on our forums.

Excuse us for the inconvenience.

On a side note, you can use our Mouse class to easily detect mouse double clicks - just use the AddMouseButtonDownHandler method to subscribe for mouse down event and check the ClickCount property of the mouse events args. If the ClickCount variable equals 2 then a double-click was performed.


Regards,
Milan
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Gerry
Top achievements
Rank 1
answered on 25 Nov 2009, 02:19 PM
I'm sorry I'm not getting the MouseDown event. Here is my code. The OnMouseDown function is never entered, when I set a breakpoint even before the clickcount check.
 
I do enter the breakpoint if I double click on the header row, but that does me no good and even then the clickcount is always 1.

        private void UIRadGrid_RowLoaded(object sender, RowLoadedEventArgs evt)  
        {  
            Mouse.AddMouseDownHandler(evt.Row, OnMouseDown);  
        }  
 
        private void OnMouseDown(object sender, Telerik.Windows.Input.MouseButtonEventArgs evt)  
        {  
            if (evt.ClickCount == 2)  
            {  
            }  
        }  
 
0
Gerry
Top achievements
Rank 1
answered on 27 Nov 2009, 10:05 AM
OK I found it: the "true" was missing in the statement below.

Mouse.AddMouseDownHandler(evt.Row, OnMouseDown, true);

However I noticed that the clickcount is not correct in some cases. I don't know why and when. But I'm ok if I can just intercept a single click. I can detect double click with a timer myself.  
Tags
GridView
Asked by
Gerry
Top achievements
Rank 1
Answers by
Milan
Telerik team
Gerry
Top achievements
Rank 1
Share this question
or