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
Icons not loading in navigation
29/09/2011
19:14
Avatar
tfraymond
New Member
Members
Forum Posts: 1
Member Since:
29/09/2011
sp_UserOfflineSmall Offline

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.

13/10/2011
00:05
Avatar
c5keddy
New Member
Members
Forum Posts: 1
Member Since:
12/10/2011
sp_UserOfflineSmall Offline

try pager: '#pager2', 

instead of

pager: jQuery('#pager'),

13/10/2011
10:23
Avatar
OlegK
Germany
Member
Members
Forum Posts: 1255
Member Since:
10/08/2009
sp_UserOfflineSmall Offline

You should change the lines

});
jQuery("#list").jqGrid('navGrid','#pager',{edit:true,add:true,del:true});

at the end of the script to

jQuery("#list").jqGrid('navGrid','#pager',{edit:true,add:true,del:true});
}); 

Currently the code of navGrid will be executed before the grid will be created inside of document ready event handler $(function(){...});

Best regards
Oleg 

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

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