Home > Back-end >  Delphi6 used dxDBGrid dxDBGridCurrencyColumn set decimal precision problem
Delphi6 used dxDBGrid dxDBGridCurrencyColumn set decimal precision problem

Time:09-25


I want to a column in the dxDBGrid reserved four decimal places, as shown in figure, DecimalPlaces set to 4, DisplayFormat set at RMB, 0.0000; - $0.0000, but the front desk still show two decimal places, excuse me what reason?
Here is take the data column debugging value:

Here is the front desk display value:

CodePudding user response:

Top, no one can help below the answer

CodePudding user response:

Can try

(dxDBGrid. The DataSource. The DataSet. Fields [index] as TBCDField). DisplayFormat:='0.0000';

The index of the index needs to be formatted column in the dataset,