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
o[g.cell] is undefined
09/11/2010
23:09
Avatar
LizD
New Member
Members
Forum Posts: 2
Member Since:
09/11/2010
sp_UserOfflineSmall Offline

I am trying to load JSON data into a grid. I keep getting this error. My JSON data appears to be being correctly returned. Firebug says the error is in this line of the jqGrid code: if(g.cell)L=o[g.cell][C]||L}v=h===1?0:h;v=(v+d)%2==1?X:"";

Am I missing an option or something I should be setting?

I'm on a tight deadline and I can't get the grid to load any data at all. It says its loading and just hangs at this error. I've used jqGrid before with arrays but never with JSON data.

Any help is appreciated.

Version 3.8.1

Here's my code for calling the grid:

$('#cell_log_link').click(function(){
    $('#activate').hide();
    $('#contact_info').hide();
    $('#update_account').hide();
    $('#login').hide();
    $('#storage').hide();
    $('#validate').hide();
    $('#cell_log').show();
    $('#message').html("");
    $('#cell_log_grid').jqGrid({
    url:'XHR/get_cellLog?name='+$('input[name="UserName"]').val(),
    datatype: 'JSON',
    mtype: 'GET',
    colNames:['Cust Code','Designation','Study Number','Start Date','Status'],
    colModel :[
      {name:'Cust Code', index:'Cust Code', width:100},
      {name:'Designation', index:'Designation', width:175},
      {name:'Study Number', index:'Study Number', width:100, align:'left'},
      {name:'Start Date', index:'Start Date', width:75, align:'right'},
      {name:'Status', index:'Status', width:100},
    ],
     jsonReader : {
      root:"cell_log_data",
      page: "currpage",
      total: "totalpages",
      records: "numrecords"
   },
    altRows: true,
   // gridview: false,
    height: "100%",
    pager: '#pager',
    rowNum:50,
    rowList:[10,25,50],
    sortname: 'Start Date',
    sortorder: 'desc',
    subgrid: false,
    viewrecords: true,
    caption: 'Cell Log'
  });
});

10/11/2010
23:15
Avatar
LizD
New Member
Members
Forum Posts: 2
Member Since:
09/11/2010
sp_UserOfflineSmall Offline

Found it! My json reader was missing repeatitems:false

Now if I could only get the pager to show up!

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

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