I want to configure my own procedure for the OnGetText event of fields in a dynamic request
My procedure is as follows:
procedure TMainFrm.MyFieldGetText(Sender: TField; var Text: String; DisplayText: Boolean); begin ... end;
- "... Captions" are the constants of the String array
I installed an event handler in the OnAfterOpen event for ADOQuery:
procedure TImportFrm.ADOQueryAfterOpen(DataSet: TDataSet); var I : Integer; begin for I := 0 to ADOQuery.FieldCount - 1 do ADOQuery.Fields[I].OnGetText := MainFrm.MyFieldGetText; end;
But after opening ADOQuery there is no text to display, it looks like the value of Text is empty!
It doesn't seem to matter what my procedure does, because when I set up an empty procedure (without code), the text does not appear too
what's wrong?
thanks...
source share