Tagged: , ,

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #103293
    Ronak Patel
    Participant

    Hello,

    I’m using the Angular component, and 2 things as below

    1. I have a summary row. For that, I want to display only 1 decimal point or want to format based on its value.
    2. and for cell if user enter something like 2.3636 then it will updated to only 2 decimal point.  I try below options but it will just update view when I edit again it will display full value.Snapshot of Code

      So it fixed to 1 decimal point but it wants actually update the value. So when I edit again it displays the whole value like 2.3636.

    Any work around for the same please update. Its urgent.

    Thanks

    • This topic was modified 2 years, 5 months ago by Ronak Patel.
    #103295
    ivanpeevski
    Participant

    Hi Ronak,

    To achieve this, please have a look at the online example here

    1. To format the summary based on the value, you need to add the OnEndEdit() and OnReady() events to the smart-grid. Then in app.component.ts attach the SummaryConditionalFormatting() function, which you can see in the code example above.
    2.  To set the decimal point of a column, you use cellsFormat: ‘f2’ in the column properties

    Best Regards,
    Ivan Peevski

    Smart HTMLElements Team
    https://www.htmlelements.com/

    • This reply was modified 2 years, 5 months ago by ivanpeevski.
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.