JavaScript UI Libraries & Blazor Components Suite – Smart UI › Forums › Data Grid › Cell Value Format › Reply To: Cell Value Format
March 23, 2023 at 11:48 am
#104623
Peter
Participant
I have also tried using a formatFunction, but the padding of the cell is still lost, making the value glued to the right edge of the cell.
{
label: 'Amount', dataField: 'Amount', editor: 'numberInput', width: 200, allowEdit: false,
formatFunction: function (settings)
{
if (settings.value != null)
{
const formatedNumber = settings.value.toLocaleString('da-DK', { maximumFractionDigits: 2, minimumFractionDigits: 2});
settings.value = formatedNumber;
}
else
{
const formatedNumber = (0.00).toLocaleString('da-DK', { maximumFractionDigits: 2, minimumFractionDigits: 2});
settings.value = formatedNumber;
}
}
}