double-click in DataGrid
am 20.12.2007 02:35:01 von ChrisJI am using a datagrid as a selection list on a form.
There is an OK button which closes the form and returns the current selection.
I would like to get a doubleclick to perform the same action
Click, and doubleclick events only occur when the non-cell area of the
datagrid is clicked.
I wrote code in the mousedown event of the DG using hittest, and this works
fine for a single click in a cell (i'm trapping for a click anywhere in a
row).
but for subsequent clicks in the same cell, the cell goes into edit mode and
swallows the event so that the mousedown no longer fires.
I've tried locking the DG and making it read only with no change in
behaviour, and disbaling the DG give no mousedowns at all
Any suggestions??