Jump to content

Dataset onSetText event


Jaume

Recommended Posts

Hi,

 

I have a problem with the onSetText Event of my datasets. When you have a UniDBEdit and you change its text, the onSetText Event of the linked dataset field is not triggered.

 

I've tested it in VCL Delphi and it worked, but in UNIGUI the event is never triggered with the visual UniDB components.

 

As it seems, the event is triggered when TField.text is changed, so maybe the UniDBEdit doesn't modify the TField.text of the linked field as the DBEdit does. Can you verify if it's a bug or you have planned to work as it is?

 

Thank you very much.

Jaume

  • Upvote 1
Link to comment
Share on other sites

  • 2 weeks later...
  • 1 year later...

procedure Ttyhgl.CDS1userGetText(Sender: TField; var Text: string;DisplayText: Boolean);
begin
  text:=DecodeString(sender.AsString );
end;

procedure Ttyhgl.CDS1userSetText(Sender: TField; const Text: string);
begin
  sender.AsString :=EncodeString(Text);      //not work
end;

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...