TWebDBEdit and validation

I have a TWebDBEdit control linked to a TFloatField in a TXDataWebDataset. The TWebDBEdit.EditType is set to weFloat.

Occasionally a user will enter two periods e.g. 123..45 which raises an exception (as you would expect). It would be useful if we could intercept and correct this. I have tried the TWebEdit.OnExit event and the TField.OnValidate and TField.GetText, but the exception is raised before any of those are called.

Where would be the best place to do this fix?

To further facilitate this, we will add the event

procedure TForm1.WebDBEdit1Validate(Sender: TObject; var AValue: string;
  var Valid: Boolean);
begin

end;

This will be in the next update.

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.