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

controls events in a cell

hi, I have a datagrid which contains a panel in each cell. I want to handle the double click event of their panels. My problem : I must to click 3 times to call the associated method. In fact, the first click gives the focus to the currentcell, then others clicks call the associated method. Can you resolve my problem please?

3 Replies

AD Administrator Syncfusion Team May 11, 2005 05:01 PM

I think you can catch a double click by listening to the grid.CurrentCellControlDoubleClick event.


JU Jonathan Urban May 12, 2005 01:12 AM

Hi, if I catch the double click on the cell which has controls, only one click will be catched by the cell and the other will be catched by the inside control panel.


AD Administrator Syncfusion Team May 12, 2005 05:02 AM

I do not know of a good way to do this. One way that I think will work is to catch the grid.CellClick event. In the handler, save the DateTime.Now. Then also handle the Click event of teh controls on your panel. There compare the DateTime.Now with the time saved in teh CellClick event. If they are within SystemInformation.DoubleClickTime, then you have a double click, and you should do your double click work. (You would also have to handle teh control''s DoubleClick event as well to catch normal double clicks when teh control is already active.)

Loader.
Live Chat Icon For mobile
Up arrow icon