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_Related Related Topics sp_TopicIcon
Newbie: Problems with Paging
18/05/2010
00:46
Avatar
MikeJudd
Member
Members
Forum Posts: 4
Member Since:
14/05/2010
sp_UserOfflineSmall Offline

I am still trying to understand how jqGrid works. I have managed to load data into my grid from the server, and I've managed to get it to sort, but I can't get the paging to work. What I would like is to download all the data from the server at once, but only have some of it displayed in the grid. Then I would like to be able to sort the data in the grid and also page forwards and backwards. Is this possible? It looks as if I have to use the loadComplete function to change the datatype to "local" or the sorting won't work (it keeps trying to go back to the server), but then clicking the paging buttons just resorts the data instead of paging.

Maybe I am missing something simple? Thank you very much for your help! Here is my Javascript:

          jQuery("#list").jqGrid({

            url:MyURL,
            datatype: 'xml',
            loadComplete : function () {
               jQuery("#list").jqGrid('setGridParam',{datatype:'local'});
            },
            mtype: 'GET',
            colNames:['Inv No','Amount','Tax','Notes'],
            colModel :[
              {name:'invid', index:'invid', width:100},
              {name:'amount', index:'amount', width:80, align:'right'},
              {name:'tax', index:'tax', width:80, align:'right'},
              {name:'note', index:'note', width:150, sortable:true}
            ],
            pager: $('#pager'),
            rowNum:3,
            rowList:[3,6,9],
            sortname: 'invid',
            sortorder: 'desc',
            viewrecords: true,
            caption: 'My first grid'
          })

and here is the XML (total of 7 rows):

<?xml version='1.0' encoding='utf-8'?>
<rows>
<page>1</page>
<total>1</total>
<records>2</records>
<row id='1'>
<cell>101</cell>
<cell>500.00</cell>
<cell>15.00</cell>
<cell>Testing</cell>
</row>
...
<row id='7'>
<cell>107</cell>
<cell>700.00</cell>
<cell>70.00</cell>
<cell>Testing7</cell>
</row>
</rows>

20/05/2010
20:00
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello,

This work is just in alfa stage and you can test it here:

http://github.com/tonytomov/jq.....d/tree/dev

Regards

Tony

For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.

27/05/2010
10:09
Avatar
amithasija
Member
Members
Forum Posts: 9
Member Since:
27/05/2010
sp_UserOfflineSmall Offline

Hey Mike you got any solution ?

Thanks

27/05/2010
16:00
Avatar
amithasija
Member
Members
Forum Posts: 9
Member Since:
27/05/2010
sp_UserOfflineSmall Offline
Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
73 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