LCL, dbgrid, adjust editor maxlength if field is string type, issue #20406

git-svn-id: trunk@32888 -
This commit is contained in:
jesus 2011-10-14 18:56:11 +00:00
parent 8e855bfacf
commit 84443e864a

View File

@ -2318,6 +2318,10 @@ begin
{$endif}
if (FDatalink<>nil) and FDatalink.Active then begin
inherited SelectEditor;
if (Editor is TCustomEdit) and (SelectedField is TStringField) then
TCustomEdit(Editor).MaxLength := SelectedField.Size;
if Assigned(OnSelectEditor) then begin
aEditor:=Editor;
OnSelectEditor(Self, SelectedColumn, aEditor);