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
Error "cm is undefined"
04/09/2009
03:38
Avatar
@rtem
New Member
Members
Forum Posts: 1
Member Since:
04/09/2009
sp_UserOfflineSmall Offline

Hello Guys,

I have added the grid code:

[code]

jQuery(document).ready(function() {
jQuery("#list").jqGrid({
url: '<?=base_url()?>submits/submitslistpage/getdata',
datatype: "json",
mtype: 'POST',
colNames: ['<{th_form_name}>', '<{lbl_date_sub}>', '<{lbl_ip_sub}>', '<{th_action}>'],
colModel: [
{name: 'form_name', index: 'form_name', width: 100, edittable: true},
{name: 'submit_created', index: 'submit_created', width: 50, edittable: true, align: "center"},
{name: 'submit_ip', index: 'submit_ip', width: 50, edittable: true, align: "center"},
{name: 'action', index: 'action', width: 50, edittable: true, align: "center"}
],
rowNum: 20,
rowList: [10, 20, 30],
imgpath: gridimgpath,
pager: jQuery('#pager'),
sortname: 'submit_created',
sortorder: "desc",
width: "800",
height: "100",
viewrecords: true,
multiselect: true,
caption: "Submits"
}).navGrid('#pager',{edit:false,add:false,del:true}
);
});

[/code]

Then I am returning following json data from server:

{"page":1,"total":1,"records":"1","rows":
[{"id":"f76d76cb2c","cell":["f76d76cb2c","2009-08-31 07:44:17"
,"85.90.206.124","form_next","action"]}]}

The error I am getting is:

[code]
cm is undefined

anonymous(Object 0=td length=1 context=td jquery=1.3.1, tr#f76d76cb2c, "action", 5, "add") grid.base.js (line 703)
anonymous(div.grid_bdiv, tr#f76d76cb2c, "action", 5) grid.base.js (line 697)
anonymous(XMLHttpRequest readyState=4 status=200, "success") grid.base.js (line 908)
L() jquery.js (line 19)
anonymous(-7) jquery.js (line 19)
[/code]


The grid shows up with columns, but then it displays “Loding..” indefinitely and throws above error.


Thanks for your time.

17/09/2009
17:50
Avatar
Jorel
Guest
Guests

Show all the output, because in the post don't show all it.

although you should check the columns in the grid and the columns in the output.

18/09/2009
04:56
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello,

You have 5 items in the response - see cell array, but you define 4 in colModel

Regards

Tony

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.

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

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