1. #1
    Sencha User
    Join Date
    Nov 2012
    Posts
    8
    Vote Rating
    0
    StefanGlaesser is on a distinguished road

      0  

    Default Unanswered: How can I format floats in a list view which shows data from store?

    Unanswered: How can I format floats in a list view which shows data from store?


    My list view contains some floats from my store, but they contains "." as decimal point and the a variable number of zeros behind the dot.

    How can I format them nicely, with a comma as seperator and only 2 decimals?

    Best regards,
    Stefan

  2. #2
    Sencha User
    Join Date
    Feb 2012
    Location
    Germany
    Posts
    72
    Vote Rating
    2
    Answers
    8
    enno is on a distinguished road

      0  

    Default


    http://www.sencha.com/learn/meet-the-list-component

    At the End Drew Neil personalized the Title of the Detail Panel. This should do the trick for you, if you use a template and the functionality in your list.

    And Stackoverflow says:
    http://stackoverflow.com/questions/661562/how-to-format-a-float-in-javascript

    var x = 5.0364342423;
    print(x.toFixed(2));
    will print 5.04.

Thread Participants: 1