[CLOSED] Sum all values of a column and display them in DisplayField

  1. #1

    [CLOSED] Sum all values of a column and display them in DisplayField

    Last edited by fabricio.murta; Mar 03, 2015 at 3:40 PM. Reason: [CLOSED]
  2. #2
    Hi @osef,

    but It doesnt works
    Please clarify what happens instead. A wrong sum? A JavaScript error? Something else?

    A runnable test case would be appreciated. In this way, we could help as soon as possible.
  3. #3
    Ok I can sum the values of column, but I do the job in this event

    <AfterRender Handler="GetColumnTotal(this,6);" Delay="2000" />
    this event runs in the grid but I need to put delay 2000 because the data is a lot and without delay doesnt work, I need to run this function when the store ends to load data, thanks
  4. #4
    I would try to handle a Store's Load event.
  5. #5
    Yes, it works, thanks
  6. #6

    Sum of Column values

    <script type="text/javascript">
    var getRate = function(grid, column) {
    var values = [];
    var rate = 1;
    var store = grid.getStore();
    grid.getStore().each(function(record) {
    values.push(record.get(column));
    });
    for (var x = 0; x < values.length; x++) {
    rate = values[0];
    break;
    }
    return rate;
    }
    </script>


    ------------------------------------------------------------------
    <ext:Parameter Name="GridRate" Value="getRate(grdPurchaseVoucher, 'ExchangeRate')"
    Mode="Raw" />
    Last edited by sateeshdasarikapil; Mar 13, 2015 at 10:22 AM.

Similar Threads

  1. Replies: 0
    Last Post: Sep 27, 2012, 6:10 PM
  2. Replies: 1
    Last Post: Jun 28, 2012, 9:39 PM
  3. [CLOSED] How to display ellipses in a DisplayField?
    By vadym.f in forum 1.x Premium Help
    Replies: 2
    Last Post: Mar 16, 2012, 1:09 PM
  4. Replies: 2
    Last Post: Mar 03, 2012, 3:33 PM
  5. [CLOSED] DisplayField is display error in ie7
    By lonely7345 in forum 1.x Premium Help
    Replies: 5
    Last Post: May 30, 2011, 9:00 AM

Tags for this Thread

Posting Permissions