Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #101693
    Dark Beccio
    Member

    HI, i’m sending this value to my grid –> “Costo”:”474799,66″
    but inside the cell i get €474.799,00 , how can i prevent round up?
    this is the grid column
    {label: ‘Costo’, dataField: ‘Costo’, dataType: ‘number’, cellsAlign: ‘right’, align: ‘center’, cellsFormat: ‘c2’}
    also in grid messages i set:
    “currencySymbol”: “€”,
    “currency”: “EUR”,
    “currencySymbolPosition”: “before”,
    “decimalSeparator”: “,”,
    “thousandsSeparator”: “.”,
     
    TY

    #101695
    yavordashew
    Member

    Hi Dark Beccio,
    In order to achieve the functionality you want, the dataType column is recieving must be a number, but in your case its a string .
    Also I have used this demo for testing:
    https://www.htmlelements.com/demos/grid/column-formatting/
    I have tested the grid with a column with cellsFormat: ‘c2’ and value as the one from your post and there is no rounding up of the value.
    Please, do not hesitate to contact us if you have any additional questions.
    Best regards,
    Yavor Dashev
    Smart UI Team
    https://www.htmlelements.com/

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.