Grid is not focusing his editor!
Original Reporter info from Mantis: EdyKnopfler
-
Reporter name: Éderson Cássio
Original Reporter info from Mantis: EdyKnopfler
- Reporter name: Éderson Cássio
Description:
When I put a TDBGrid in editing mode and make ".SetFocus", the caret doesn't appear. I found that the internal Editor wasn't receiving the focus if necessary.
I made a simple modification to TCustomGrid.SetFocus:
--- ORIGINAL CODE
procedure TCustomGrid.SetFocus;
var
...
begin
...
inherited SetFocus; // --------------------- this call...
{$IFDEF dbgGrid}
DebugLn('TCustomGrid.SetFocus END');
{$ENDIF}
end;
--- MODIFIED CODE
procedure TCustomGrid.SetFocus;
var
...
begin
...
// ... became this:
if Editor <> nil then
Editor.SetFocus
else
inherited SetFocus;
{$IFDEF dbgGrid}
DebugLn('TCustomGrid.SetFocus END');
{$ENDIF}
end;
Steps to reproduce:
Just do:
DataSet.Edit;
DBGrid.SetFocus;
// Where's the cursor?
Mantis conversion info:
- Mantis ID: 24193
- OS: Windows XP
- OS Build: SP3
- Platform: Win32
- Version: 1.0.8