In the following code, it gives a compiler error: [dcc32 Error] orm_utils.pas(729):…
- User
In the following code, it gives a compiler error: [dcc32 Error] orm_utils.pas(729): E2010 Incompatible types: 'TGetEditEvent' and 'Procedure' // Locate the column based on the column header name for ColIndex := 0 to AGrid.ColCount - 1 do begin if SameText(AGrid.Cells[ColIndex, 0], ColumnName) then begin FGrid := AGrid; FGrid.OnGetEditText := procedure (Sender: TObject; ACol, ARow: Integer; var Value: string) begin if (ARow > 0) and (ACol > 0) then begin GridToRecInfo(ACol, ARow); end; end;
codeFGrid.OnSetEditText := procedure (Sender: TObject; ACol, ARow: Integer; const Value: string) begin if (ARow > 0) and (ACol > 0) then begin FGrid.Cells[ACol, ARow] := Value; end; end; FColumnMapping.AddOrSetValue(PropName, ColIndex); UpdateGrid; Break; end;end;
- Assistant
- User
the signature is this one:
function TCustomDrawGrid.GetEditText(ACol, ARow: Longint): string; begin Result := ''; if Assigned(FOnGetEditText) then FOnGetEditText(Self, ACol, ARow, Result); end;
- Assistant
- User
Change the procedure TQryRecArray.MapToGrid(AGrid: TAdvStringGrid; const PropName: string; const ColumnName: string); so it is fixed
- Assistant