<?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: groupText</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/grouptext</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/grouptext/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>tony on groupText</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/grouptext#p31266</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/grouptext#p31266</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>This is for another forum <a href="http://www.trirand.net" rel="nofollow" target="_blank">http://www.trirand.net</a></p>
]]></description>
        	        	<pubDate>Tue, 21 Oct 2014 17:55:43 +0300</pubDate>
        </item>
        <item>
        	<title>kalofa on groupText</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/grouptext#p31198</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/grouptext#p31198</guid>
        	        	<description><![CDATA[<p><span class="hps">HELP - SOS</span></p>
<p>I want to see <span class="hps">the result of</span> <span class="hps">an arithmetic</span> <span class="hps">operation</span> <span class="hps">between two fields</span><br />
<span class="hps">in this case</span> <span class="hps">the</span> <span class="hps">sum of the field</span> <span class="hps">xx</span> <span class="hps">-</span> <span class="hps">zz</span> <span class="hps">sum</span> <span class="hps">field</span> <span class="hps">and</span> <span class="hps">the result</span> <span class="hps">is displayed</span> <span class="hps">under the name</span> <span class="hps">yy</span></p>
<p>"groupText" =&#62;array('&#60;b&#62; Movil:{0}&#60;/b&#62; -Â  Deuda: {summaryRound: 2, summaryRoundType = array("xx" - "zz" =&#62;array("yy"=&#62;"SUM")}Â  '),</p>
<p><span class="hps">all</span> <span class="hps">leave here</span> <span class="hps">full</span> <span class="hps">code </span></p>
<p>&#60;?php<br />
require_once '../../../jq-config.php';<br />
// include the jqGrid Class<br />
require_once ABSPATH."php/jqGrid.php";<br />
// include the driver class<br />
require_once ABSPATH."php/jqGridPdo.php";<br />
// Connection to the server<br />
$conn = new PDO(DB_DSN,DB_USER,DB_PASSWORD);<br />
// Tell the db that we use utf-8<br />
$conn-&#62;query("SET NAMES utf8");</p>
<p>// Create the jqGrid instance<br />
$grid = new jqGridRender($conn);<br />
// Write the SQL Query<br />
$grid-&#62;SelectCommand = 'SELECT n_orden,Â  n_movil, fecha, concepto, debe, haber FROM cuentas_corrientes ';<br />
// set the ouput format to json<br />
$grid-&#62;dataType = 'json';<br />
// Let the grid create the model from SQL query<br />
$grid-&#62;setColModel();</p>
<p>// Set the url from where we obtain the data<br />
$grid-&#62;setUrl('c_2.php');<br />
Â <br />
$grid-&#62;setGridOptions(array(</p>
<p>Â Â Â  "rowNum"=&#62;10,<br />
Â Â Â  "sortname"=&#62;"n_movil",<br />
Â Â Â  "rowList"=&#62;array(50,100,150),<br />
Â Â Â  "height"=&#62;'auto',<br />
Â Â Â  "footerrow"=&#62;true,<br />
Â Â Â  "userDataOnFooter"=&#62;true,<br />
Â Â Â  "grouping"=&#62;true,<br />
Â Â Â  "groupingView"=&#62;array(<br />
Â Â Â  Â "groupField" =&#62; array('n_movil', 'n_orden'),<br />
Â Â Â  Â "groupColumnShow" =&#62; array(true),<br />
Â Â Â  Â "groupCollapse" =&#62; true,<br />
Â Â Â  Â "shrinkToFit" =&#62; false,Â Â <br />
Â Â Â Â  "groupText" =&#62;array('&#60;b&#62; Movil:{0}&#60;/b&#62; -Â  Deuda: {summaryRound: 2, summaryRoundType = array("xx" - Â "zz"=&#62;array("yy"=&#62;"SUM")}Â  '),<br />
Â Â Â Â Â "groupDataSorted" =&#62; true,<br />
Â Â Â  Â "groupSummary" =&#62; true,<br />
Â Â Â  Â "groupSummaryPos" =&#62; true,Â Â <br />
/*{ groupField: ['Name'], groupColumnShow: [false], groupText: ['&#60;b&#62;{0} - {1} reg(s)&#60;/b&#62;'], groupCollapse: true, groupDataSorted: true, groupOrder: ['asc'] }*/<br />
Â Â Â  )<br />
Â Â Â  ));<br />
Â Â <br />
// Change some property of the field(s)<br />
$grid-&#62;setColProperty("concepto", array("label"=&#62;"Conceptos", "width"=&#62;250, "align"=&#62;"left", "background"=&#62;"blue"));<br />
$grid-&#62;setColProperty("debe", array("label"=&#62;"Debe", "width"=&#62;50, "align"=&#62;"right" ));<br />
$grid-&#62;setColProperty("haber", array("label"=&#62;"Haber", "width"=&#62;50, "align"=&#62;"right"));<br />
$grid-&#62;setColProperty("n_movil", array("label"=&#62;"Movil", "width"=&#62;20, "align"=&#62;"center"));<br />
$grid-&#62;setColProperty("n_orden", array("label"=&#62;"Orden", "width"=&#62;25, "align"=&#62;"center"));<br />
$grid-&#62;setColProperty("fecha", array("label"=&#62;"Fecha", "width"=&#62;45, "align"=&#62;"center",<br />
Â Â Â  "formatter"=&#62;"date",<br />
Â Â Â  "formatoptions"=&#62;array("srcformat"=&#62;"Y-m-d H:i:s","newformat"=&#62;"d/m/Y")<br />
Â )<br />
);<br />
// Add a summary property to the debe Column<br />
$grid-&#62;setColProperty("haber", array("summaryType"=&#62;"sum", /*summaryTpl=&#62;"Sum: {0}",*/ "formatter"=&#62;"number"));<br />
$grid-&#62;setColProperty("debe", array("summaryType"=&#62;"sum", /*summaryTpl=&#62;"Sum: {0}",*/ "formatter"=&#62;"number"));<br />
$summaryrows = array("haber"=&#62;array("haber"=&#62;"SUM"));<br />
$summaryrows = array("debe"=&#62;array("debe"=&#62;"SUM"));<br />
$summaryRoundType = array("debe" - "haber" =&#62;array("saldo"=&#62;"SUM"));<br />
$grid-&#62;addUserData(array("n_orden"=&#62;"Total Gral:"));</p>
<p>Â </p>
<p>// Enjoy</p>
<p>$grid-&#62;renderGrid('#grid','#pager',true, $summaryrows, null, true,true);<br />
$conn = null;</p>
<p>?&#62;</p>
]]></description>
        	        	<pubDate>Fri, 03 Oct 2014 22:02:14 +0300</pubDate>
        </item>
</channel>
</rss>