<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
	<title>jQuery Grid Plugin - jqGrid - Topic: jQgrid - summaryType: mysum</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/jqgrid-summarytype-mysum</link>
	<description><![CDATA[Grid plugin]]></description>
	<generator>Simple:Press Version 5.7.5.3</generator>
	<atom:link href="http://www.trirand.com/blog/?page_id=393/help/jqgrid-summarytype-mysum/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>milad on jQgrid - summaryType: mysum</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/jqgrid-summarytype-mysum#p25137</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/jqgrid-summarytype-mysum#p25137</guid>
        	        	<description><![CDATA[<p>I managed to acheive this by doing the following:</p>
</p>
<p>I define global variables for the current value of column A and Column C, and the current group by</p>
</p>
<p>var tColA = 0.0;</p>
<p>var tColC = 0.0;</p>
<p>var tCurrentGroupBy;</p>
</p>
<p>Then in my function, I do the following:</p>
</p>
<p>&#160;function mysum(a, b, c) {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; if (tCurrentGroupBy!= c.GroupByCol) {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; tColA= 0.0;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; tColC= 0.0;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; tCurrentGroupBy= c.GroupByCol;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; tColA= tColA + parseFloat(c.ColA);<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; tColC= tColC + parseFloat(c.ColC);<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; }<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; else {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#160; tColA= tColA + parseFloat(c.ColA);<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; tColC= tColC + parseFloat(c.ColC);<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; }</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; return ((tColC / tColA) * 100);<br />&#160;&#160;&#160; }</p>
</p>
<p>not sure if there is a better way to do this, but this seems to work.&#160; Are there any other suggestions?</p>
]]></description>
        	        	<pubDate>Fri, 11 Nov 2011 21:13:09 +0200</pubDate>
        </item>
        <item>
        	<title>milad on jQgrid - summaryType: mysum</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/jqgrid-summarytype-mysum#p25136</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/jqgrid-summarytype-mysum#p25136</guid>
        	        	<description><![CDATA[<p>Do you have a good example where a function is used for the summaryType property?&#160; Let&#39;s say I have a grid that contains grouping and has 3 columns (A, B, C).&#160; What I would like to do is make the summaryType property for column C point to a function.&#160; In that function, I need to able to set the summary total for column C within each group as: sum(C) / sum(A) * 100.&#160; Note, columns A and B, have their own totals (but those are just summaryType: &#39;sum&#39;).&#160; What is the best way to do what I am describing for the total summary row for column C?</p>
</p>
<p>Thank you.</p>
]]></description>
        	        	<pubDate>Fri, 11 Nov 2011 19:15:15 +0200</pubDate>
        </item>
</channel>
</rss>