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

Double clicking not distinguishing with single clicking

3 Answers 209 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Rebecca
Top achievements
Rank 1
Rebecca asked on 03 Apr 2013, 04:51 PM
We have inherited a project that uses RADGrid.  It has both events for double and single clicking enabled.

I saw this forum post:
http://www.telerik.com/community/forums/aspnet-ajax/grid/rowclick-amp-rowdoubleclick.aspx
Reading through your documentation, EnablePostBackOnRowClick should be set to false by default, but I tried setting it explictly and I am still experiencing the problem.  I put breakpoints in Javascript on the rowclick and rowdblclick events, and rowdblclick never fires; rowclick fires twice.

I did notice that your Silverlight controls have a mouse speed, and that your scheduler product has something that needs to be reset that keeps track of state.  Is there anything comparable in the Grid?  Any other tips or gotchas to making this work correctly?

Thanks,
Rebecca

3 Answers, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 08 Apr 2013, 11:15 AM
Hello Rebecca,

I created a simple self-contained website that will help you understand how to handle the click and double click events. Please test it on your end and then let me know if you need more information.

Kind regards,
Daniel
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Rebecca
Top achievements
Rank 1
answered on 08 Apr 2013, 12:55 PM
Thanks, maybe I just don't understand how it should work.

How I feel that it should work is that if I subcribe to both a double click event and a single click event, if I double click I should ONLY get the double click event firing.  But what happens in reality is that I get 2 single click events and then one double click event. 

Are you saying getting 3 events for a double click is expected behavior?

Thanks,
Rebecca
0
Daniel
Telerik team
answered on 11 Apr 2013, 05:09 PM
Hello Rebecca,

This is the way the double click event works. It is triggered after two subsequent clicks. You can also try the following:
<a href="javascript:void(0)" ondblclick="rowDblClick()" onclick="rowClick()">Click area</a>

Just paste the aforementioned code somewhere in the demo I sent to you. You will see that the behavior is exactly the same as of RadGrid.
If you want to distinguish between click and dblclick you will have to use setTimeout for that purpose.

Best regards,
Daniel
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Grid
Asked by
Rebecca
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Rebecca
Top achievements
Rank 1
Share this question
or