[Lazarus] Suggestion on DBGrid

Jesus Reyes jesusrmx at yahoo.com.mx
Sat Mar 8 19:35:04 CET 2014






> El Sábado, 8 de marzo, 2014 6:02:01, FreeMan <freeman35 at delphiturkiye.com> escribió:
> > Hello,
> In lazarus/lcl/dbgrids.pas,  TDBGridOption set  add item 
> "dgNextRowonEnter" and "dgNextRowonEnterOnLastColumn"
> TCustomDBGrid.KeyDown(...
> line: 2172
>              if (dgNextRowonEnter in Options)then begin
>                GetDeltaMoveNext(ssShift in Shift, DeltaCol, DeltaRow, 
> AutoAdvance);
>                MoveSel(True);
>              end;
> when RowSelected, enter is always moveto nextrow.
> "dgNextRowonEnterOnLastColumn" some times usefull, dataset's 
> autoedit, 
> but I don't want to new row.
> I wrote here, what you are thing about this? if its usefull I wanna add 
> to bugtracker for suggestion. or team add quickly :)
> Thank you


AutoAdvance works on pressing ENTER (or TAB), in a DbGrid with AutoAdvance:=aaDown and while editing you press the ENTER key, the next row will be selected, that seems to be what your dbNextRowOnEnter will do. About dNextRowOnEnterOnLastColumn, it seems to be the same as AutoAdvance:=aaRightDown.

I don't think adding duplicate of existing functionality would be a good idea.


Jesus Reyes A.




More information about the Lazarus mailing list