Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9090603
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T22:24:41+00:00 2026-06-16T22:24:41+00:00

I am using ExtJS 4.1, and trying to display my currency field as value

  • 0

I am using ExtJS 4.1, and trying to display my currency field as value / 1000, but only on display.
For example, if user input 1234.56, it will appear as 1,234.56 on screen, but only when it is displayed on screen. For everything else, it is stored as 1234560. In every calculation behind that number is treated as 1234560. I am using bigint as store, and I want to avoid float, since in my country, 2 billion is a normal number, but will also need the fraction part.

How can you do that?

Thank you.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T22:24:42+00:00Added an answer on June 16, 2026 at 10:24 pm

    After playing around, I have another solution, one based on model.
    Create a non-existent field, such as price_display, and use it to display;

    Ext.define('app.model.PriceSample', {
      extend: 'Ext.data.Model',
      field: [
        {name: 'price', type: 'int'},
        {name: 'price_display', type: 'float', convert: function (value, records) {
          if (value) { //on write
            record.set('price', value * 1000);
            return value;
          } else {
            return record.get('price') / 1000;
          }
        }}
      ]
    }
    

    on your grid or combo or anything use price_display instead of price. but when you want to perform a math, use price.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've run into an issue while using ExtJS 4.0.7. I'm trying to display a
i'm trying to debug an ExtJS application using IE8 but the file ext-all-debug.js it's
I was trying to render a simple piechart using ExtJs 3.0 but could not.
I am trying to draw an pie chart using ExtJS but something is going
I am trying to develop a FilterEditor using ExtJS. user creates some range, comparison,
I'm trying to make data grid with paging using ExtJs framework, but unfortunately my
I'm trying to create a never-ending looping animation using ExtJs, but am hitting the
Using ExtJs. I'm trying to design a main which is divided into three sub
I am using ExtJS (3) and just trying to populate a combobox/drop down using
I am using extjs 4.1 and trying to do the event delegation which in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.