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
Local Data and pagination
29/11/2010
17:36
Avatar
gtm
872
New Member
Members
Forum Posts: 1
Member Since:
29/11/2010
sp_UserOfflineSmall Offline

Hi All,

I am new to jqGrid, it looks great thanks. I am trying to load local data into a grid and it works fine unitl I put the pager option on.

When I add the pager option my grid is rendered empty with the text "undefined" in the center if the grid.

Here is the javascript for my test:

jQuery("#queueTable").jqGrid({

datatype: "clientside",

autowidth: true,

colNames: ['Name', 'Type', 'Desc'],

colModel: [

{name:'name', index:'name'},

{name:'type', index:'type'},

{name:'desc', index:'desc'}

],

altRows: true,

caption: ""

});

var mydata = [

{name:"Test", type:"type1",desc:"Desc1"},

{name:"Test1", type:"type2",desc:"Desc2"}

];

for (var i = 0; i < mydata.length; ++i) {

jQuery("#queueTable").jqGrid('addRowData', i+1, mydata[i]);

}

Below is my html:

<table id="queueTable"></table>

<div id="queuePager"></div>

The above works fine, but when I add

pager: "#queuePager" 

to the jqGrid constructor I get  the grid with the column headers but no data. There is a white box with an orange border which says 'undefined' in orange.

I assume I am missing some configuration option but I can't seem to figure it out.

Thanks

 Glenn 

04/12/2010
00:03
Avatar
OlegK
Germany
Member
Members
Forum Posts: 1255
Member Since:
10/08/2009
sp_UserOfflineSmall Offline

Hello Glen,

probably you included not all jqGrid modules which you needed. Look at the code here which shows how I would do what you need.

Best regards
Oleg 

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

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