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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Template number formatting

Thread ID:





128265 Jan 11,2017 01:55 PM UTC Jan 13,2017 09:15 AM UTC JavaScript 3
Tags: ejMap
Asked On January 11, 2017 01:55 PM UTC

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

Dharanidharan Dharmasivam [Syncfusion]
Replied On 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, 

Replied On January 12, 2017 02:19 PM UTC

Works perfect

Anandaraj T [Syncfusion]
Replied On 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. 



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon