Mega Code Archive

 
Categories / Delphi / ADO Database
 

How to edit an inplace TMemo inside a TDBGrid

Title: How to edit an inplace TMemo inside a TDBGrid function TCustomDBGrid.GetEditLimit: Integer; begin Result := 0; if Assigned(SelectedField) and (SelectedField.DataType in [ftString, ftWideString, ftMemo]) then -- Add Result := SelectedField.Size; end; function TCustomDBGrid.GetEditText(ACol, ARow: Longint): string; begin Result := ''; if FDatalink.Active then with Columns[RawToDataColumn(ACol)] do if Assigned(Field) then Result := Field.AsString; -- Change this. FEditText := Result; end; Just compare theese edited functions with the original ones, and you will know what to change. To get multiline cell support (not in memo fields!) for DBGridPlus, send me an email and i can send you the changed DBGridPlus.pas file.