1. #1
    Sencha User
    Join Date
    May 2010
    Location
    Dallas, TX
    Posts
    68
    Vote Rating
    1
    Answers
    6
    rkanemeier is on a distinguished road

      0  

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

    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
    Vote Rating
    1
    Answers
    6
    rkanemeier is on a distinguished road

      0  

    Default


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

  4. #3
    Sencha User
    Join Date
    Sep 2011
    Posts
    573
    Vote Rating
    73
    Answers
    58
    ettavolt is just really nice ettavolt is just really nice ettavolt is just really nice ettavolt is just really nice

      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
    Vote Rating
    1
    Answers
    6
    rkanemeier is on a distinguished road

      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!

Thread Participants: 1