Forum

November 2nd, 2014
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_TopicIcon
Using 'userDataOnFooter' with xml Data.
12/09/2010
06:24
Avatar
neophitus
New Member
Members
Forum Posts: 1
Member Since:
12/09/2010
sp_UserOfflineSmall Offline

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!

12/09/2010
12:20
Avatar
OlegK
Germany
Member
Members
Forum Posts: 1255
Member Since:
10/08/2009
sp_UserOfflineSmall Offline

You have to fill the information, which you will see in the footer, in the userdata. The userdata must be the part of data which you send from the server (see /jqgridwiki/doku.php?id=wiki:retrieving_data#user_data for more information)

Regards
Oleg 

Forum Timezone: Europe/Sofia

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.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information