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
django and jqgrid fields dict
01/03/2009
23:57
Avatar
cornbread
Member
Members
Forum Posts: 33
Member Since:
28/01/2009
sp_UserOfflineSmall Offline

I'm having an issue with jqgrid being compatible with django serialization.

It appears to be an issue with the information being in the fields dict. According to this project: http://code.google.com/p/appfusedjango/ all that was needed was a single patch in version 3.3.1. I attempted to do similar above line 839 of grid.base.js. I couldn't get this to work.

It did appear to me that something similar existed if repeatitems: true. I tried to do that however I get this error in firebug:

ccur is undefined
[Image Can Not Be Found] row.id = ccur[idn] || i+1;
I appreciate any help.

03/03/2009
03:16
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

Try to use the last version - 3.4.2

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.

03/03/2009
21:45
Avatar
cornbread
Member
Members
Forum Posts: 33
Member Since:
28/01/2009
sp_UserOfflineSmall Offline

Hey Tony,

I upgraded. When setting repeatitems: true I get the following error:
ccur is undefined
grid.base.js
Line 817

When repeatitem: false I don't get an error but my grid shows blank items. Here is my json data:

{"total":0, "records":7, "rows":[{"pk": 1, "model": "auto.vehicle", "fields": {"location": "Beaverton", "price": 9000, "state": "OR", "zip": 97123, "address": "123 Park Ave"}}, {"pk": 4, "model": "auto.vehicle", "fields": {"location": "Cottage Grove", "price": 14900, "state": "OR", "zip": 97472, "address": "2233 Cottage way"}}, {"pk": 7, "model": "auto.vehicle", "fields": {"location": "Springfield", "price": 18990, "state": "OR", "zip": 97477, "address": "2686 Wayside LN"}}, {"pk": 8, "model": "auto.vehicle", "fields": {"location": "Eugene", "price": 2874, "state": "OR", "zip": 97402, "address": "76555 Walker St"}}, {"pk": 9, "model": "auto.vehicle", "fields": {"location": "Cottage Grove", "price": 2300, "state": "OR", "zip": 97472, "address": "223 Smith Way"}}, {"pk": 10, "model": "auto.vehicle", "fields": {"location": "Fall Creek", "price": 7700, "state": "OR", "zip": 97438, "address": "123 Little Fall Creek Rd."}}, {"pk": 11, "model": "auto.vehicle", "fields": {"location": "Eugene", "price": 7640, "state": "OR", "zip": 97402, "address": "48596 Martin Luther King Jr Blvd."}}] }

Thanks for your help

06/03/2009
00:46
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

How looks the jsonReader?

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.

06/03/2009
05:30
Avatar
cornbread
Member
Members
Forum Posts: 33
Member Since:
28/01/2009
sp_UserOfflineSmall Offline

jsonReader: {
                                root: "rows",
                                id: "id",
                                index: "id",
                                page: "page",
                                total: "total",
                                records: "records",
                                repeatitems: false,
                },

06/03/2009
12:32
Avatar
cornbread
Member
Members
Forum Posts: 33
Member Since:
28/01/2009
sp_UserOfflineSmall Offline

I have also tried it this way both with repeatitems true and false:

jsonReader: {
                                root: "rows",
                                id: "pk",
                                cell: "fields",
                                page: "page",
                                total: "total",
                                records: "records",
                                repeatitems: true,
                },

When repeatitems: true, I get checkboxes down the left side but the bottom lines of the rows are missing. When false the rows show up blank.

TIA

11/03/2009
02:40
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

HEllo,

And what is the 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.

11/03/2009
23:27
Avatar
cornbread
Member
Members
Forum Posts: 33
Member Since:
28/01/2009
sp_UserOfflineSmall Offline

colModel :[
                 {name:”Image”, index:”image”, width:120, sortable:false},
                 {name:”id”, index:”id”, width:120},
                 {name:”address”, index:”address”, width:260, sortable:false},
                 {name:”location”, index:”location”, width:150, align:”left”},
                 {name:”zip”, index:”zip”, width:70, align:'center'},
       {name:”price”, index:”price”, width:110, align:'center', formatter:'currency'},

14/03/2009
22:19
Avatar
cornbread
Member
Members
Forum Posts: 33
Member Since:
28/01/2009
sp_UserOfflineSmall Offline

Is my colModel correct? Need any other info?

thanks again tony,
richard

15/03/2009
12:09
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

Testted and worked (if this is your data and colModel)

jsonReader:

jsonReader : {
                    root: "rows",
                    id: "pk",
                    cell: "fields",
                    page: "page",
                    total: "total",
                    records: "records",
                    repeatitems: false
}

colModel:

colModel :[
 {name:"Image", index:"image", width:120, sortable:false},
 {name:"id", index:"id", width:120, jsonmap:"pk"},
 {name:"address", index:"address", width:260, sortable:false, jsonmap:"fields.address"},
 {name:"location", index:"location", width:150, align:"left",jsonmap:"fields.location"},
 {name:"zip", index:"zip", width:70, align:'center', jsonmap:"fields.zip"},
 {name:"price", index:"price", width:110, align:'center', formatter:'currency',jsonmap:"fields.price"}
                   ],
]

Enjoy

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.

16/03/2009
03:50
Avatar
cornbread
Member
Members
Forum Posts: 33
Member Since:
28/01/2009
sp_UserOfflineSmall Offline

Great thanks Tony!!!! That worked perfect. Keep up the great work!!

25/10/2010
14:06
Avatar
bhneto
Rio de Janeiro
Member
Members
Forum Posts: 3
Member Since:
07/10/2010
sp_UserOfflineSmall Offline

Hi

And if I save this grid in server side once, how could I get all rows in PHP code? I appreciate any help. Best regards.

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

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