PDA

View Full Version : [CLOSED] SummaryColumn Condition



vzx
Jan 12, 2013, 9:40 AM
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.

Baidaly
Jan 14, 2013, 12:23 AM
Hello!

Try to use CustomSummaryType. Example of usage: http://examples2.ext.net/#/GridPanel/Plugins/Summary/

vzx
Jan 14, 2013, 8:00 AM
Thanks, that is exactly what i am looking for.