Forum


06:24

12/09/2010

Its possible to set the property:
userDataOnFooter
without use an json data source? I have an entire application with all xml data, and i want to use that to sumarize my coluns.
As Folows:
jQuery().ready(function (){
jQuery('#pesq2').jqGrid({
url:'ajaxList.php',
datatype:'xml',
colNames:['Pago', 'Cod','DocNo','Vcto','Descricao','Plano de Contas','Entrada','Saida'],
colModel:[
{name:'Liquidado',index:'Liquidado', width:38, align:'center',formatter:'checkbox'} ,
{name:'Cod',index:'Cod', width:75},
{name:'DocNo',index:'DocNo', width:75},
{name:'Vcto',index:'Vcto', width:85, formatter:'date'},
{name:'Descricao',index:'Descricao', width:250},
{name:'Plano',index:'Plano', width:80},
{name:'Entrada',index:'Entrada',formatter:'currency', align:'right',width:50},
{name:'Saida',index:'Saida',formatter:'currency', align:'right', width:50}
],
// altRows:true,
toolbar:true,
rowNum:10,
rowList:[10,20,30,50],
autowidth: true,
height:'100%',
pager:'#bpesq2',
sortname:'Vcto',
viewrecords:true,
sortorder:'asc',
caption:'',
footerrow : true,
userDataOnFooter : true
});
});
My PHP File:
$et = ">";
echo "<?xml version='1.0' encoding='iso-8859-1'?$et\n";
echo "<rows>";
echo "<page>".$page."</page>";
echo "<total>".$total_pages."</total>";
echo "<records>".$count."</records>";
// não se esqueça de colocar os dados em texto no CDATA
$TotEnt = 0;
$TotSai = 0;
while($row = $RS2->fetch()) {
// Somatorio:
$TotEnt += $row['Entrada'];
$TotSai += $row['Saida'];
echo "<row id='". $row['Cod']."'>";
echo "<cell><![CDATA[". $row['Liquidado']."]]></cell>";
echo "<cell><![CDATA[". $row['Cod']."]]></cell>";
echo "<cell><![CDATA[". $row['DocNo']."]]></cell>";
echo "<cell><![CDATA[". $row['Vcto']."]]></cell>";
echo "<cell><![CDATA[". $row['Descricao']."]]></cell>";
echo "<cell><![CDATA[". $row['Plano']."]]></cell>";
echo "<cell><![CDATA[". $row['Entrada']."]]></cell>";
echo "<cell><![CDATA[". $row['Saida']."]]></cell>";
echo "</row>";
}
echo "</rows>";
//fechando o banco de dados
$DB = null;
Can Anyone help?
Thx in advance!
Most Users Ever Online: 715
Currently Online:
47 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
OlegK: 1255
markw65: 179
kobruleht: 144
phicarre: 132
YamilBracho: 124
Renso: 118
Member Stats:
Guest Posters: 447
Members: 11373
Moderators: 2
Admins: 1
Forum Stats:
Groups: 1
Forums: 8
Topics: 10592
Posts: 31289
Newest Members:
, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66