I want to format the quantity cell for dynamic.
like
1 row, the precision value is 2, When input the quantity=10,the quantity cell display 10.00
2 row, the precision value is 3, When input the quantity=11,the quantity cell display 11.00
columns: [[
{ field: 'peid', hidden: true, title: 'ID' },
{ field: 'code', title: 'Code', width: '110px', sortable: true },
{ field: 'name', title: 'Name', width: '120px', sortable: true },
{ field: 'model', title: 'Model', width: '140px', sortable: true },
{ field: 'precision', title: 'Precision', width: '70px' },
{
field: 'qty', title: 'Quantity', width: '100px', editor: {
type: 'numberbox', options: {
required: true,
formatter: function (value, row, index) {
return parseFloat(value).toFixed(row.precision);
}
}
}
},