Forum


03:11

03/11/2011

None of the navigation buttons (add/edit/view/delete/search/refresh) show up, but the center paging and the right records view appear properly. Need help to figure it out what's wrong.
(1) jqGrid version: 4.2.0
(2) jQuery UI version: 1.8.16
(3) Global grid settings:
jQuery.extend(jQuery.jgrid.defaults, {
datatype: 'json',
sortname: 'id',
sortorder: 'desc',
autowidth: true,
height: 'auto',
shrinkToFit: true,
viewrecords: true,
cmTemplate: {
align: 'right'
},
gridview: true,
jsonReader: {
repeatitems: false,
cell: '',
id: '0'
},
altRows:true
});
(4) Local Settings:
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<body>
<table id="userRoleGrid"></table>
<div id="userRolePager"></div>
<script type="text/javascript">
jQuery(document).ready(function(){
jQuery("#userRoleGrid").jqGrid({
url: '<c:url value="/userrole/jqgrid/grid"/>',
mtype: 'get',
colNames:['Id', 'Name', 'Description'],
colModel : [
{name:'id', index:'id', editable:true},
{name:'name', index:'name', editable:true},
{name:'description', index:'description', editable:true}
],
rowNum: 5,
rowList: [5,10,15],
sortname: 'name',
sortorder: 'asc',
pager: '#userRolePager',
editurl: '<c:url value="/userrole/jqgrid/grid"/>',
gridview: false,
caption: 'User Roles'
});
});
jQuery('#userRoleGrid').jqGrid('navGrid','#userRolePager');
</script>
</body>
(5) All data showed up very well and also the sorting works very well
(6) I used chrome development tool to Inspect the left part of the pager it just says <td id="userRolePager_left" align="left"></td>, nothing else
(7) Is there something missed in the new version or I missed something?
Thanks for help
09:27

Moderators
30/10/2007

Hello,
The problem was disscussed before:
Please put
jQuery('#userRoleGrid').jqGrid('navGrid','#userRolePager');
in document ready and not after it.
jQuery(document).ready(function(){
jQuery("#userRoleGrid").jqGrid({
...
});
jQuery('#userRoleGrid').jqGrid('navGrid','#userRolePager');
});
Regards
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:
62 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