[CLOSED] Toggle Render? Refresh Render?

  1. #1

    [CLOSED] Toggle Render? Refresh Render?

    Hi
    I have a grid, with float values... 12300000.00.
    The default rendered for the grid changes this to $1,230,000.00.

    --Great--

    Now, I want to change the render to output $1.23M


    How can I, client-side...loop through the store/grid and/or "refresh" the rendered.


    My rendered handles both types bases on a hidden parameter.
    I have a button the changes that hidden param, then i want to "refresh" the grid/store..

    I've tried changing the store value (ie setting it back to the same value, marking the record dirty) but since the
    underlying float value does change, I don't think the render is firing?

    
    
    function Money(v) {
        try {
    
    
            if (hidPercentDollar.getValue() == '$')
                return Ext.util.Format.number(v, '$000,000,000,000.00');
    
    
            var val = parseFloat(v);
            if (val > 1000000 && val < 1000000000) {
                //million
                return '$' + parseFloat(val / 1000000).toFixed(2).toString() + 'M';
            }
            else if (val > 1000000000 && val < 1000000000000) {
                //billion
                return '$' + parseFloat(val / 1000000000).toFixed(2).toString() + 'B';
            }
            else if (val > 1000000000000) {
                //trillion
                return '$' + parseFloat(val / 1000000000000).toFixed(2).toString() + 'T';
            }
            else
                return Ext.util.Format.number(v, '$000,000,000,000.00');
        }
        catch (e) {
            alert("Money" + e.message);
        }
    }
    Last edited by Daniil; Jul 08, 2011 at 3:41 PM. Reason: [CLOSED]
  2. #2
    Hi,

    Please just call .refresh() for a grid's view.
    grid.getView().refresh();
  3. #3
    Works! Thanks.

Similar Threads

  1. Replies: 0
    Last Post: Jan 11, 2011, 2:45 PM
  2. [CLOSED] Some render problems
    By asztern in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Oct 15, 2010, 10:35 AM
  3. [CLOSED] [1.0] Render example
    By Jurke in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Jun 17, 2010, 11:10 AM
  4. [CLOSED] Gridpanel Render help
    By JonG in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Feb 09, 2010, 4:32 AM
  5. Lag Before Render
    By simonmicheal in forum 1.x Help
    Replies: 3
    Last Post: Oct 08, 2009, 5:12 PM

Posting Permissions