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
xmlstring pagination problem
28/10/2008
02:54
Avatar
cdac.amit
New Member
Members
Forum Posts: 2
Member Since:
28/10/2008
sp_UserOfflineSmall Offline

Hi All,

I am using 'xmlstring' to populate grid, but paginaton is not working in this. I am using lift/scala for my developement. code I have written is given below :

html part

<body style="font-size: 11px;">
        <table id="list4" class="scroll" cellpadding="3" cellspacing="0"></table>
        <div id="pager4" class="scroll" style="text-align:center;"></div>
    </body>

script part

<lift:Testing:grid>
        <script type="text/javascript">
            $(document).ready(function()
            {
                var xmlDoc = '<flexi:xmldata/>';
                jQuery('#list4').jqGrid(
                {
                    datatype: 'xmlstring',
                    datastr : xmlDoc,
                    height: 250,
                     colNames:['Inv No', 'Client Name', 'Inv Date', 'Amount', 'Tax', 'Total', 'Notes'],
                      colModel:[
                                   {name:'id',index:'id', width:60, sorttype:'int'},
                                         {name:'name',index:'name', width:100,align:'left'},
                                         {name:'invdate',index:'invdate', width:90, sorttype:'date'},
                                         {name:'amount',index:'amount', width:80, align:'right',sorttype:'float'},
                                         {name:'tax',index:'tax', width:80, align:'right',sorttype:'float'},
                                         {name:'total',index:'total', width:80,align:'right',sorttype:'float'},
                                         {name:'note',index:'note', width:150, sortable:false}
                                      ],
                      imgpath: '../images/flexigrid/images',
                      multiselect: true,
                      caption: 'Manipulating XML Data',
                      viewrecords: true,
                      rowNum:10,
                      //rowList:[10,20,30],
                      pager: jQuery('#pager4'),
                      sortname: 'id'
                });
            }).navGrid('#pager4',{edit:false,add:false,del:false});
        </script>   
    </lift:Testing:grid>

I tried to debug the grid.base.js but got no clue. Please help me to implemenet pager with 'xmlstring' data.

Thanks & Regards,

Amit Kumar Verma

29/10/2008
03:41
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

When using xmlstring, after the first call the data automatically

is set to clientSide. Insted use onPagging event

onPaging : function (button){

$(gridid).setGridParam({datatype: "xmlstring"})

}

To force the pagging

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.

29/10/2008
05:28
Avatar
cdac.amit
New Member
Members
Forum Posts: 2
Member Since:
28/10/2008
sp_UserOfflineSmall Offline

Thanks Tony for your response, but the problem persists. Actually the

xmlstring has 16 rows but I want to do pagination of 10 rows per page. While the page loads for first time it shows all 16 rows, even I am providing

'page', 'total' and 'records' informations.

Even after page load if I click 'next', it shows me all the rows.

29/10/2008
10:32
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

As described in the docs - jqGrid does not support client side pagnation.

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.

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

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