Results 1 to 4 of 4

Thread: Proper Way To Set CellEdit Value Format For numberfield in ExtJS 4.0.7

  1. #1
    Sencha User
    Join Date
    May 2010
    Location
    Dallas, TX
    Posts
    68
    Answers
    6
    Vote Rating
    1
      0  

    Default Answered: Proper Way To Set CellEdit Value Format For numberfield in ExtJS 4.0.7

    I am struggling with a way to force formatting on an editable cell using the cellediting grid plugin. The store value for the cell is 170.00. When the cell is opened for edit, the value is 170. When you press tab or enter, the app thinks the value has changed from 170.00 to 170. How do I configure my app so that the cellediting plugin has the same format as the store/grid? The following code does not seem to work:

    How do you embed fiddle code/page?


  2. I believe you are using 'string' or 'auto' fields in your model. Try to change field type to 'float' and use numbercolumn (don't forget about format) for displaying them.

    Fiddles are inserted with [fiddle] tag.

  3. #2
    Sencha User
    Join Date
    May 2010
    Location
    Dallas, TX
    Posts
    68
    Answers
    6
    Vote Rating
    1
      0  

    Default

    (was trying to edit my post and accidentally replied).

  4. #3
    Sencha User
    Join Date
    Sep 2011
    Posts
    574
    Answers
    59
    Vote Rating
    74
      2  

    Default

    I believe you are using 'string' or 'auto' fields in your model. Try to change field type to 'float' and use numbercolumn (don't forget about format) for displaying them.

    Fiddles are inserted with [fiddle] tag.

  5. #4
    Sencha User
    Join Date
    May 2010
    Location
    Dallas, TX
    Posts
    68
    Answers
    6
    Vote Rating
    1
      1  

    Default

    You nailed it. I was using nothing in my model. It defaulted a value of 0.00 to a string. Weird. I changed it to float and everything worked fine!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •