Forum
02:54
28/10/2008
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
03:41
Moderators
30/10/2007
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.
05:28
28/10/2008
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.
10:32
Moderators
30/10/2007
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.
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.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66