View Issue Details

IDProjectCategoryView StatusLast Update
0033294LazarusLCLpublic2018-03-07 21:51
ReporterGiovanni SearaAssigned ToMichl 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
PlatformDesktopOSWindowsOS Version10
Product Version1.8.2Product Build 
Target VersionFixed in Version1.9 (SVN) 
Summary0033294: Pressing RETURN in the last row of the BDGRid the focus stay in the last collumn
DescriptionWith the focus on the last row and last collumn of DBGrid when you press RETURN the focus go for next row and last collumn, but should go for first column.

This behavior occurs if the first field of DataSet is not visible (Visible: = False).
Steps To Reproduce1. Configure the DBGrid for not show all records of DataSet.
2. Set the first field of DataSet go not visible.
3. Click in the last cell visible in the DBGrid.
4. Press RETURN.
5. The focus go to next row and the last collumn.
TagsDbCtrls, lcl, TDBGrid
Fixed in Revision57458
LazTarget1.8.4
Widgetset
Attached Files

Activities

Giovanni Seara

2018-03-01 21:41

reporter  

Video_1519920342.wmv (189,149 bytes)

Giovanni Seara

2018-03-01 21:43

reporter  

BUG - RETURN KEY in the last row DBGrid.zip (2,763 bytes)

Giovanni Seara

2018-03-01 22:04

reporter   ~0106808

Last edited: 2018-03-01 22:07

View 2 revisions

Possible correction:
- Alter the GetDeltaMoveNext procedure of the TCustomGrid, look:

function TCustomGrid.GetDeltaMoveNext(const Inverse: boolean;
  var ACol, ARow: Integer; const AAutoAdvance: TAutoAdvance): boolean;
var
  DeltaCol,DeltaRow: Integer;

  function CalcNextStep: boolean;
  var
    aa: TAutoAdvance;
    cCol,cRow: Integer;
  begin
[...]
    CCol := ACol + DeltaCol;
    CRow := ARow + DeltaRow;

    // is CCol,CRow within range?
    result :=
      (CCol<=ColCount-1)and(CCol>=FixedCols)and
      (CRow<=RowCount{-1})and(CRow>=FixedRows);
  end;
[...]
end;

Michl

2018-03-06 20:42

developer  

TestBufdataset.zip (2,051 bytes)

Michl

2018-03-06 20:44

developer   ~0106958

Fixed in trunk. Please test and close if ok.

Giovanni Seara

2018-03-07 21:51

reporter   ~0106975

The bug in this conditions has been fixed.

Issue History

Date Modified Username Field Change
2018-03-01 21:41 Giovanni Seara New Issue
2018-03-01 21:41 Giovanni Seara File Added: Video_1519920342.wmv
2018-03-01 21:42 Giovanni Seara Tag Attached: DbCtrls
2018-03-01 21:42 Giovanni Seara Tag Attached: lcl
2018-03-01 21:42 Giovanni Seara Tag Attached: TDBGrid
2018-03-01 21:43 Giovanni Seara File Added: BUG - RETURN KEY in the last row DBGrid.zip
2018-03-01 22:04 Giovanni Seara Note Added: 0106808
2018-03-01 22:07 Giovanni Seara Note Edited: 0106808 View Revisions
2018-03-03 19:46 Michl Assigned To => Michl
2018-03-03 19:46 Michl Status new => assigned
2018-03-06 20:42 Michl File Added: TestBufdataset.zip
2018-03-06 20:44 Michl Fixed in Revision => 57458
2018-03-06 20:44 Michl LazTarget => 1.8.4
2018-03-06 20:44 Michl Note Added: 0106958
2018-03-06 20:44 Michl Status assigned => resolved
2018-03-06 20:44 Michl Fixed in Version => 1.9 (SVN)
2018-03-06 20:44 Michl Resolution open => fixed
2018-03-07 21:51 Giovanni Seara Note Added: 0106975
2018-03-07 21:51 Giovanni Seara Status resolved => closed