Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Delphi DBGrid Format Display Values

I need to format values in a DBGrid to display in a certain format ex '#,##0.00'. Any idea how to do that?

Regards, Pieter

like image 225
Pieter van Wyk Avatar asked Nov 21 '25 16:11

Pieter van Wyk


1 Answers

you can use the DisplayFormat property of the field to format.

check this sample

TFloatField(YourDataSet.FieldByName('field')).DisplayFormat := '#,##0.00';
like image 88
RRUZ Avatar answered Nov 23 '25 11:11

RRUZ



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!