fiorilli Posted July 15, 2019 Posted July 15, 2019 In VCL applications, a DBEdit updates its value according to the GetText event of a TField. In UniGui applications, this does not occur (Examples attached). How to solve? GetText.zip Quote
belo Posted July 16, 2019 Posted July 16, 2019 Hi, The ID field of your XML is 2 in size Maybe this will solve ... procedure TMainForm.FDMemTable1IDGetText(Sender: TField; var Text: string; DisplayText: Boolean); begin if Sender.AsVariant = Null then Exit; Text := FormatFloat('00', StrToFloat(Sender.AsString)); end; procedure TMainForm.FDMemTable1IDSetText(Sender: TField; const Text: string); begin Sender.AsString := FormatFloat('00', StrToFloat(Text)); end; Regards, Eduardo Belo Quote
fiorilli Posted July 16, 2019 Author Posted July 16, 2019 Thanks for the suggestion Eduardo, But that's not my problem. If you look at the source code I'm doing exactly the same thing with 4 digits. The problem is the UniDBEdit does not update with the GetText value, passing 2, 4 or N digits it "should" be updated equal to the VCL. ------------------------------------------------------------------ PT-BR: Obrigado pela sugestão Eduardo, Mas não é esse o meu problema. Se o olhar o código fonte estou fazendo exatamente a mesma coisa porém com 4 dígitos. O problema é o UniDBEdit não atualizar com o valor do GetText, passando 2, 4 ou N dígitos ele "deveria" ser atualizado igual ao VCL. Quote
belo Posted July 16, 2019 Posted July 16, 2019 The problem is not the UniDBEdit but the UniDBGrid. If you disable the UniDBGrid, the error does not occur. Maybe this behavior is a bug. PT-BR: O problema não é o UniDBEdit e sim o UniDBGrid. Se você desativar o UniDBGrid não acontece o erro. Talvez esse comportamento seja um bug. Quote
fiorilli Posted July 16, 2019 Author Posted July 16, 2019 I tested without grid as well and the problem occurred anyway. Can you provide an example? --------------------------- Testei sem o grid também e o problema ocorreu mesmo assim. Pode disponibilizar um exemplo? Quote
charles13115255 Posted October 23, 2025 Posted October 23, 2025 I'm having the same problem... Is there a solution? Quote
Sherzod Posted November 17, 2025 Posted November 17, 2025 On 11/7/2025 at 7:47 AM, charles13115255 said: up! On 7/19/2019 at 4:19 PM, fiorilli said: up 1. UniDBEdit.CheckChangeDelay = 500 2. procedure TMainForm.UniDBEdit1Change(Sender: TObject); begin UniDBGrid1.RefreshCurrentRow(); end; Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.