GTK2: TDBGrid loses focus after editing of each cell, makes TDBGrid editing effectively non-functional on GTK2
Original Reporter info from Mantis: 7bit
-
Reporter name: Bernd Kreuss
Original Reporter info from Mantis: 7bit
- Reporter name: Bernd Kreuss
Description:
The attached demo program can be used to demonstrate the issue. if you edit a cell in the grid and then press enter or use one of the arrow keys (up/down) to update the datasource and navigate away from the edited row the whole grid immediately loses focus. This results in subsequent keystrokes being either ignored or (worse) doing unwanted actions in a different control on the same form.
As an example consider the following sequences of keys to fill some cells with the letter "a", this sequence of keystrokes should work, it is the way most users expect to be able to navigate through a grid without having to use the mouse to re-focus the grid after every cell:
a &LtPos;enter> a &LtPos;enter> a &LtPos;enter> a &LtPos;enter>
&LtPos;down > a &LtPos;down> a &LtPos;down> a &LtPos;up>
forcing a DBGrid.SetFocus in the OnDataUpdate of the TDataSource seems to work around the issue but this does not feel like it is the optimal solution.
I have marked this as major because this bug makes any usage of the TDBGrid on GTK2 effectively impossible (its reasonable to assume that this behavior of TDBGrid would never be accepted by an end user of an application) and since the TDBGrid is an essential cornerstone for database aware applications this impacts the usage of Lazarus for this whole class of applications.
Mantis conversion info:
- Mantis ID: 17239
- Version: 0.9.29 (SVN)
- Fixed in version: 0.9.29 (SVN)
- Fixed in revision: 27183 (#f77fe592)
- Target version: 0.9.30