Focus problem in TDBGrid
Original Reporter info from Mantis: EdyKnopfler
-
Reporter name: Éderson Cássio
Original Reporter info from Mantis: EdyKnopfler
- Reporter name: Éderson Cássio
Description:
Actually the problem was in TCustomGrid.
I have made a little modification so that the editor gets the focus when the grid receive it (I was using dgAlwaysShowEditor).
But, if I clicked on another cell at the same line the focus went to another control in the form.
I found the problem was at DoEditorHide: when the editor has the focus, hiding it would remove the focus from the grid, so let's make the grid the focused control.
The modifications I have made are in DoEditorHide and SetFocus of TCustomGrid. They're commented in the attached file.
Steps to reproduce:
Put the grid in editor mode (F2 or EditorMode := True)
Click on another cell at the same line
Mantis conversion info:
- Mantis ID: 24195
- OS: Windows XP
- OS Build: SP3
- Platform: Win32
- Version: 1.0.8