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
Length of colNames colModel!
15/12/2010
10:23
Avatar
sirshurf
Member
Members
Forum Posts: 43
Member Since:
06/10/2009
sp_UserOfflineSmall Offline

I am getting nuts...

Here is my Code:

$(document).ready(function() {
$("#tgrff").jqGrid({"url":"/invoice/index2", "datatype":"json", "mtype":"POST", "viewrecords":true,
"colModel":{"0":{"label":"bred8", "name":"qwe8"}},
"autowidth":true, "height":"400px", "rowNum":20,
"rowList":{"0":20, "1":40, "2":60, "3":80, "4":100},
"caption":"Tgrff", "postData":{"grid":"tgrff"}, "pager":"tgrff_pager"});
$("#tgrff").navGrid("#tgrff_pager",{"edit":false, "add":false, "del":false}, {}, {}, {});
});

I am getting: Length of colNames <> colModel!

Using JQuery 1.4.4, UI 1.8.6, jQGRId 3.8.2

Had the same problem with the previouse to.

Why?

15/12/2010
10:28
Avatar
sirshurf
Member
Members
Forum Posts: 43
Member Since:
06/10/2009
sp_UserOfflineSmall Offline

Lowered jQuery to 1.4.2, started to work...

:(((

the UI is left on 1.8.6

Using Google CDN

15/12/2010
12:50
Avatar
OlegK
Germany
Member
Members
Forum Posts: 1255
Member Since:
10/08/2009
sp_UserOfflineSmall Offline

You use wrong encoding for arrays. Instead of

"rowList":{"0":20, "1":40, "2":60, "3":80, "4":100}

and

"colModel":{"0":{"label":"bred8", "name":"qwe8"}}

you should use arrays instead:

"rowList":[20, 40, 60, 80, 100]

and

"colModel":[{"label":"bred8", "name":"qwe8"}]

Moreover parameter "pager":"tgrff_pager" is also wrong. You mean probably "pager":"#tgrff_pager". I recommend you to use the last version of jQuery (currently 1.4.4) because it has pertormance improvemennt in working with CSS, which is relevant for jqGrid.

Best regards
Oleg

15/12/2010
13:51
Avatar
sirshurf
Member
Members
Forum Posts: 43
Member Since:
06/10/2009
sp_UserOfflineSmall Offline

I will try that, if I would have the time.

But currently since it's not working I have switched to 1.4.2 which is working ok.

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

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