[CLOSED] SummaryColumn Condition

  1. #1

    [CLOSED] SummaryColumn Condition

    Hi,

    I have a gridpanel with a summarycolumn. I want to have a conditional sum by looking to another column. If the other column is 'P' then i will be '+', if it is 'M' i will be '-'. How can i do this?

    col A / col B
    P / 100
    P / 50
    M / 25
    P / 10

    Total/ 135

    <ext:GridPanel ID="gp1" runat="server" StoreID="Store1" >
        <ColumnModel runat="server">
            <Columns>                     
                <ext:Column runat="server" Width="50" DataIndex="PM" />                       
                <ext:SummaryColumn runat="server" Width="90" DataIndex="Value" SummaryType="Sum" Align="Right">
                    <Renderer Fn="Ext.util.Format.numberRenderer('0,000.00')" />
                    <SummaryRenderer Fn="Ext.util.Format.numberRenderer('0,000.00')" />
                </ext:SummaryColumn>                      
            </Columns>
        </ColumnModel>
        <Features>
            <ext:Summary runat="server" />
        </Features>
    </ext:GridPanel>
    Thanks.
    Last edited by Daniil; Jan 14, 2013 at 12:13 PM. Reason: [CLOSED]
  2. #2
    Hello!

    Try to use CustomSummaryType. Example of usage: http://examples2.ext.net/#/GridPanel/Plugins/Summary/
  3. #3
    Thanks, that is exactly what i am looking for.

Similar Threads

  1. Replies: 2
    Last Post: Jun 07, 2012, 9:28 AM
  2. How to stop deleting the records based on the condition.
    By kondareddy1984 in forum 1.x Help
    Replies: 1
    Last Post: Nov 15, 2011, 6:53 AM
  3. If else condition handler in Listeners
    By NishaLijo in forum 1.x Help
    Replies: 2
    Last Post: Jul 29, 2010, 7:20 AM
  4. config item condition
    By [WP]joju in forum 1.x Help
    Replies: 5
    Last Post: Sep 25, 2009, 2:00 AM
  5. TreePanel - Drag and drop node if condition
    By Kaido in forum 1.x Help
    Replies: 0
    Last Post: Jul 14, 2009, 8:25 AM

Tags for this Thread

Posting Permissions