View Issue Details

IDProjectCategoryView StatusLast Update
0017239LazarusWidgetsetpublic2010-08-25 10:39
ReporterBernd Kreuss Assigned ToJesus Reyes  
Status closedResolutionfixed 
Product Version0.9.29 (SVN) 
Target Version0.9.30Fixed in Version0.9.29 (SVN) 
Summary0017239: GTK2: TDBGrid loses focus after editing of each cell, makes TDBGrid editing effectively non-functional on GTK2
DescriptionThe 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 <enter> a <enter> a <enter> a <enter>
<down > a <down> a <down> a <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.
TagsNo tags attached.
Fixed in Revision27183
WidgetsetGTK 2
Attached Files


2010-08-22 13:56


Jesus Reyes

2010-08-24 22:18

developer   ~0040431

please test and close if there are no more issues.

Bernd Kreuss

2010-08-25 10:39

reporter   ~0040440

Works perfectly now. Thanks for fixing this so quickly.

Issue History

Date Modified Username Field Change
2010-08-22 13:56 Bernd Kreuss New Issue
2010-08-22 13:56 Bernd Kreuss File Added: TDBGrid_not_working.tar.bz2
2010-08-22 13:56 Bernd Kreuss Widgetset => GTK 2
2010-08-22 19:07 Jesus Reyes Status new => assigned
2010-08-22 19:07 Jesus Reyes Assigned To => Jesus Reyes
2010-08-23 21:46 Jesus Reyes LazTarget => 0.9.30
2010-08-23 21:46 Jesus Reyes Target Version => 0.9.30
2010-08-24 22:18 Jesus Reyes Fixed in Revision => 27183
2010-08-24 22:18 Jesus Reyes Status assigned => resolved
2010-08-24 22:18 Jesus Reyes Fixed in Version => 0.9.29 (SVN)
2010-08-24 22:18 Jesus Reyes Resolution open => fixed
2010-08-24 22:18 Jesus Reyes Note Added: 0040431
2010-08-25 10:39 Bernd Kreuss Status resolved => closed
2010-08-25 10:39 Bernd Kreuss Note Added: 0040440