I would like to know which record a user selected when he doubleclicks on the DBGrid component. I think it can be done by using the onDblClick event. Then I take the current record (the first click selects the record in the grid, the second click triggers the event handler).
But that is not always correct !
Suppose I have a DBGrid component that is half filled with records. A part of the window is empty. When a user doubleclicks on the empty part the DblClick event will be triggered, but I shouldn't do anything, because he didn't click on a record in the grid. But how can I know that ? OnDblClick has no parameters ??? The current record isn't correct, because when you click on the empty part, the last record will be selected.
Thanks in advance,