I have defined a column in Database as float.
The column is being shown as number in the model.
I want to format the columnn in Gridview with two decimal places and couldn’t find a way, how it can be done.
I have tried to use this code but getting the error like - Unknown format type: number
[
'label' => 'Charges',
'attribute' =>'category_charges',
'contentOptions' => ['class' => 'col-lg-1'],
'format' => ['number',2]
],
Note I can achieve the same using custom function, but I am sure i.e. not the best method.
Thanks.