Forum



First, thank you for the wonderful jqGrid -- very nice.
However, I'm slowly going crazy about the icons (search, refresh, etc.) - no matter what I do, I can't get them to display in the Navigation bar. I've created a sample HTML page, trying to eliminate as many variables as possible, as follows:
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml,
datatype: 'json',
colNames:['Actions', 'Device', 'Serial Number', 'Type', 'Model','Status', 'Monitoring', 'SmartNet', 'Site', 'Protocol', 'Notes'],
colModel :[
{name: 'myac', width:50, fixed:true, sortable:false, resize:false, formatter:'actions',
formatoptions:{keys:true}},
// {name:'division', index:'division', width:50, sortable:true, editable: true, edittype:"select", editoptions:{ value: "<?= $divisionOutput; ?>"}, editrules:{custom:true, custom_func:checkDivision}},
{name:'deviceName', index:'deviceName'},
{name:'serialNumber', index:'serialNumber'},
{name:'deviceType', index:'deviceType'},
{name:'deviceModel', index:'deviceModel'},
{name:'lifecycleStatus', index:'lifecycleStatus'},
{name:'monitoringTier', index:'monitoringTier'},
{name:'smartNet', index:'smartNet'},
{name:'siteId', index:'siteId'},
{name:'managementProtocol'},
{name:'notes', index:'notes'}
],
pager: jQuery('#pager'),
rowNum:10,
rowList:[10,20,30],
sortname: 'serialNumber',
sortorder: 'desc',
viewrecords: true,
gridview: true,
caption: 'My first grid'
});
});
jQuery("#list").jqGrid('navGrid','#pager',{edit:true,add:true,del:true});
</script>
</head>
<body>
<table id="list"><tr><td/></tr></table>
<div id="pager"></div>
</body>
</html>
I've gone through the documentation & tutorials, & I'm pulling my hair out in clumps; the data loads, the navigation works, I can see the total number of records, sort & resize columns -- but for the life of me, I can't get the refresh, edit, etc. buttons to work -- and for the project I'm working on, I need to add some custom buttons as well.
Any hope is greatly appreciated -- thanks.
10:23

10/08/2009

You should change the lines
jQuery("#list").jqGrid('navGrid','#pager',{edit:true,add:true,del:true});
at the end of the script to
});
Currently the code of navGrid will be executed before the grid will be created inside of document ready event handler $(function(){...});
Best regards
Oleg
Most Users Ever Online: 715
Currently Online:
54 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