We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Template number formatting

I'm using this example. How can I format float number values in ejMap template (2 digits after coma etc)?

3 Replies

DD Dharanidharan Dharmasivam Syncfusion Team January 12, 2017 01:12 PM UTC

Hi Paul, 
Thanks for using Syncfusion product. 
We have analyzed your query and prepared a sample with respect to your requirement. In this we have used ej.format method which will format the number with the specified precision. If the precision value is 2, then two digits will be shown after the decimal. Kindly find the code snippet below, 
            parseDouble: function (amount) { 
                  amount = parseInt(amount);                 
                                               amount= ej.format(amount,"n2"); 
                return amount; 
For your reference we have attached the sample. Kindly find the sample from below link, 

PA Paul January 12, 2017 02:19 PM UTC

Works perfect

AT Anandaraj T Syncfusion Team January 13, 2017 09:15 AM UTC

Hi Paul, 

Most welcome. 

Please let us know if you have any other queries regarding this. We are glad to assist you. 


Live Chat Icon For mobile
Up arrow icon