1 <div class="body-wrap" xmlns:ext="http://www.extjs.com"><div class="top-tools"><a class="inner-link" href="#Ext.ux.grid.GroupSummary-props"><img src="resources/images/default/s.gif" class="item-icon icon-prop">Properties</a> <a class="inner-link" href="#Ext.ux.grid.GroupSummary-methods"><img src="resources/images/default/s.gif" class="item-icon icon-method">Methods</a> <a class="inner-link" href="#Ext.ux.grid.GroupSummary-events"><img src="resources/images/default/s.gif" class="item-icon icon-event">Events</a> <a class="inner-link" href="#Ext.ux.grid.GroupSummary-configs"><img src="resources/images/default/s.gif" class="item-icon icon-config">Config Options</a> <a class="bookmark" href="../docs/?class=Ext.ux.grid.GroupSummary"><img src="resources/images/default/s.gif" class="item-icon icon-fav">Direct Link</a> </div><h1>Class <a href="source/GroupSummary.html#cls-Ext.ux.grid.GroupSummary">Ext.ux.grid.GroupSummary</a></h1><table cellspacing="0"><tr><td class="label">Package:</td><td class="hd-info">Ext.ux.grid</td></tr><tr><td class="label">Defined In:</td><td class="hd-info"><a href="source/GroupSummary.html#cls-Ext.ux.grid.GroupSummary">GroupSummary.js</a></td></tr><tr><td class="label">Class:</td><td class="hd-info"><a href="source/GroupSummary.html#cls-Ext.ux.grid.GroupSummary">GroupSummary</a></td></tr><tr><td class="label">Subclasses:</td><td class="hd-info"><a href="output/Ext.ux.grid.HybridSummary.html" ext:cls="Ext.ux.grid.HybridSummary">HybridSummary</a></td></tr><tr><td class="label">Extends:</td><td class="hd-info">Object</td></tr></table><div class="description">A GridPanel plugin that enables dynamic column calculations and a dynamically
2 updated grouped summary row.</div><div class="hr"></div><a id="Ext.ux.grid.GroupSummary-configs"></a><h2>Config Options</h2><table cellspacing="0" class="member-table"><tbody><tr><th colspan="2" class="sig-header">Config Options</th><th class="msource-header">Defined By</th></tr><tr class="config-row expandable "><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.ux.grid.GroupSummary-summaryRenderer"></a><b><a href="source/GroupSummary.html#cfg-Ext.ux.grid.GroupSummary-summaryRenderer">summaryRenderer</a></b> : Function<div class="mdesc"><div class="short">Renderer example:summaryRenderer: function(v, params, data){
3 return ((v === 0 || v > 1) ? '(' + v +' Tasks)' : '(...</div><div class="long">Renderer example:<pre><code>summaryRenderer: <b>function</b>(v, params, data){
4 <b>return</b> ((v === 0 || v > 1) ? <em>'('</em> + v +<em>' Tasks)'</em> : <em>'(1 Task)'</em>);
5 },</code></pre></div></div></td><td class="msource">GroupSummary</td></tr><tr class="config-row expandable "><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.ux.grid.GroupSummary-summaryRenderer"></a><b><a href="source/ux-all-debug.html#cfg-Ext.ux.grid.GroupSummary-summaryRenderer">summaryRenderer</a></b> : Function<div class="mdesc"><div class="short">Renderer example:summaryRenderer: function(v, params, data){
6 return ((v === 0 || v > 1) ? '(' + v +' Tasks)' : '(...</div><div class="long">Renderer example:<pre><code>summaryRenderer: <b>function</b>(v, params, data){
7 <b>return</b> ((v === 0 || v > 1) ? <em>'('</em> + v +<em>' Tasks)'</em> : <em>'(1 Task)'</em>);
8 },</code></pre></div></div></td><td class="msource">GroupSummary</td></tr><tr class="config-row "><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.ux.grid.GroupSummary-summaryType"></a><b><a href="source/GroupSummary.html#cfg-Ext.ux.grid.GroupSummary-summaryType">summaryType</a></b> : String<div class="mdesc">The type of
9 calculation to be used for the column. For options available see
10 <a href="output/Ext.ux.grid.GroupSummary.html#Ext.ux.grid.GroupSummary-Calculations" ext:member="Calculations" ext:cls="Ext.ux.grid.GroupSummary">Calculations</a>.</div></td><td class="msource">GroupSummary</td></tr><tr class="config-row "><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.ux.grid.GroupSummary-summaryType"></a><b><a href="source/ux-all-debug.html#cfg-Ext.ux.grid.GroupSummary-summaryType">summaryType</a></b> : String<div class="mdesc">The type of
11 calculation to be used for the column. For options available see
12 <a href="output/Ext.ux.grid.GroupSummary.html#Ext.ux.grid.GroupSummary-Calculations" ext:member="Calculations" ext:cls="Ext.ux.grid.GroupSummary">Calculations</a>.</div></td><td class="msource">GroupSummary</td></tr></tbody></table><a id="Ext.ux.grid.GroupSummary-props"></a><h2>Public Properties</h2><table cellspacing="0" class="member-table"><tbody><tr><th colspan="2" class="sig-header">Property</th><th class="msource-header">Defined By</th></tr><tr class="property-row expandable "><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.ux.grid.GroupSummary-Calculations"></a><b><a href="source/GroupSummary.html#prop-Ext.ux.grid.GroupSummary-Calculations">Calculations</a></b> : Object<div class="mdesc"><div class="short">Calculation types for summary row:<div class="mdetail-params">
13 sum : <div class="sub-desc">
14 count : <div class="sub-d...</div><div class="long">Calculation types for summary row:</p><div class="mdetail-params"><ul>
15 <li><b><tt>sum</tt></b> : <div class="sub-desc"></div></li>
16 <li><b><tt>count</tt></b> : <div class="sub-desc"></div></li>
17 <li><b><tt>max</tt></b> : <div class="sub-desc"></div></li>
18 <li><b><tt>min</tt></b> : <div class="sub-desc"></div></li>
19 <li><b><tt>average</tt></b> : <div class="sub-desc"></div></li>
21 <p>Custom calculations may be implemented. An example of
22 custom <code>summaryType=totalCost</code>:</p><pre><code><i>// define a custom summary <b>function</b></i>
23 Ext.ux.grid.GroupSummary.Calculations[<em>'totalCost'</em>] = <b>function</b>(v, record, field){
24 <b>return</b> v + (record.data.estimate * record.data.rate);
25 };</code></pre></div></div></td><td class="msource">GroupSummary</td></tr><tr class="property-row expandable "><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.ux.grid.GroupSummary-Calculations"></a><b><a href="source/ux-all-debug.html#prop-Ext.ux.grid.GroupSummary-Calculations">Calculations</a></b> : Object<div class="mdesc"><div class="short">Calculation types for summary row:<div class="mdetail-params">
26 sum : <div class="sub-desc">
27 count : <div class="sub-d...</div><div class="long">Calculation types for summary row:</p><div class="mdetail-params"><ul>
28 <li><b><tt>sum</tt></b> : <div class="sub-desc"></div></li>
29 <li><b><tt>count</tt></b> : <div class="sub-desc"></div></li>
30 <li><b><tt>max</tt></b> : <div class="sub-desc"></div></li>
31 <li><b><tt>min</tt></b> : <div class="sub-desc"></div></li>
32 <li><b><tt>average</tt></b> : <div class="sub-desc"></div></li>
34 <p>Custom calculations may be implemented. An example of
35 custom <code>summaryType=totalCost</code>:</p><pre><code><i>// define a custom summary <b>function</b></i>
36 Ext.ux.grid.GroupSummary.Calculations[<em>'totalCost'</em>] = <b>function</b>(v, record, field){
37 <b>return</b> v + (record.data.estimate * record.data.rate);
38 };</code></pre></div></div></td><td class="msource">GroupSummary</td></tr></tbody></table><a id="Ext.ux.grid.GroupSummary-methods"></a><h2>Public Methods</h2><table cellspacing="0" class="member-table"><tbody><tr><th colspan="2" class="sig-header">Method</th><th class="msource-header">Defined By</th></tr><tr class="method-row expandable "><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.ux.grid.GroupSummary-showSummaryMsg"></a><b><a href="source/ux-all-debug.html#method-Ext.ux.grid.GroupSummary-showSummaryMsg">showSummaryMsg</a></b>( <code>String groupValue</code>, <code>String msg</code> )
40 void<div class="mdesc"><div class="short">Show a message in the summary row.
41 grid.on('afteredit', function(){
42 var groupValue = 'Ext Forms: Field Anchoring'...</div><div class="long">Show a message in the summary row.
43 <pre><code>grid.on(<em>'afteredit'</em>, <b>function</b>(){
44 <b>var</b> groupValue = <em>'Ext Forms: Field Anchoring'</em>;
45 summary.showSummaryMsg(groupValue, <em>'Updating Summary...'</em>);
46 });</code></pre><div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>groupValue</code> : String<div class="sub-desc"></div></li><li><code>msg</code> : String<div class="sub-desc">Text to use as innerHTML for the summary row.</div></li></ul><strong>Returns:</strong><ul><li>void</li></ul></div></div></div></td><td class="msource">GroupSummary</td></tr><tr class="method-row expandable "><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.ux.grid.GroupSummary-toggleSummaries"></a><b><a href="source/ux-all-debug.html#method-Ext.ux.grid.GroupSummary-toggleSummaries">toggleSummaries</a></b>( <code>Boolean visible</code> )
48 void<div class="mdesc"><div class="short">Toggle the display of the summary row on/off</div><div class="long">Toggle the display of the summary row on/off<div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>visible</code> : Boolean<div class="sub-desc"><tt>true</tt> to show the summary, <tt>false</tt> to hide the summary.</div></li></ul><strong>Returns:</strong><ul><li>void</li></ul></div></div></div></td><td class="msource">GroupSummary</td></tr></tbody></table><a id="Ext.ux.grid.GroupSummary-events"></a><h2>Public Events</h2><div class="no-members">This class has no public events.</div></div>