We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Grid cell double click

Hi,

Syncfusion version - 4.4.051.
.NET framwork - 3.5.

I am using GridControl in my application. I am handling CellClick event and doing something on this event. I also need to handle double click event and do something else. Everytime i double click the single click event also gets handled. I need to handle only the Double click event when I double click. Kindly let me know how to do this.

-Rohith


1 Reply

RC Rajadurai C Syncfusion Team December 13, 2008 08:35 AM UTC

Hi Rohith,

Thanks for your interest in Syncfusion products.

In general, there is no way not fire CellClick when a CellDoubleClick happens.

One comment is that CellDoubleClick does not always get fired (it does not fire when you click an editing cell control). If you need to catch all double clicks, you can use CurrentCellControlDoubleClick.

The only way to handle this problem is to use a timer.

In CellClick, set a timer to fire in SystemInformation.DoubleClickTime time. Then in CellDoubleClick (or CurrentCellControlDoubleClick), turn this timer off. In your timer event handler, turn off the timer and do what you would have done in your CellClick event. The timer event handler will only get hit if it was not a double click (otherwise the double click handler would have turned off the timer). This is, in effect, delaying the single click action until it is known whether a double click occurred or not.

Regards,
Rajadurai


Loader.
Live Chat Icon For mobile
Up arrow icon