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

DoubleClick without unselect a row

Hello, I'm trying to manage the double click in a GDBG. I want that when I make a double click in a cell, this cell (row) will not unselected. Any idea?? Thanks, Ivan.

1 Reply

AD Administrator Syncfusion Team November 10, 2003 12:53 PM UTC

The unselection is done on the first mousedown so changing this behavior will be a little problematic. Effectively, you would have to wait SystemInformation.DoubleClickTime to decide whether the click is a single click or a double click. This means the user will click, and then there will be a pause, and then the selection will go away (if the click is not part of a double click). The other option is to make the selection go away immediately, but then restore it if it is a double click. But this might lead to a flash that you do not want. I am confident that either of these solutions are doable, it is just a matter of selecting what you want to see, and then implementing thing. Attached is a rough little sample that postpones a mousedown until it is know that it is not part of a double click. You could probably fine tune it make it work better in situations where you are dragging (etc) instead of clicking, but it should give you an idea of what postponing the mouse action would look like. It is probably not what you want. You could also attempt postponing changing the selection (in OnSelectionChanging) instead of postponing OnMouseDown. This might be more what you had in mind.

Live Chat Icon For mobile
Up arrow icon