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
remapColumns leads to g.p.colModel[i] is undefined error
13/09/2011
15:18
Avatar
loudmouthman
England
Member
Members
Forum Posts: 4
Member Since:
03/02/2010
sp_UserOfflineSmall Offline

using 4.1.2

I have discovered some wierd result in FormEditing when using a grid which has had the columnsRemapped ( i unhide, resort, rehide columns in that routine ). The error coming back is

g.p.colModell[i] is undefined   jquery.jqGrid.src.js

5389 -                 for( i =0, len=g.p.colModel.length;i<len; i++){
                    if(g.p.colModel[i].name==valref) {
                        edtrul = g.p.colModel[i].editrules;
                        valref = i;
                        try { nm = g.p.colModel[i].formoptions.label; } catch (e) {}
                        break;
                    }

If I turn off remapping the columns the colModel object does not contain a spurious 0 undefined item at the top; however with colModel remapping enabled the g.p.colModel looks like

0
undefined
1
Object { name="ol", index="ol", width=1, more…}
2
Object { name="item", index="item", align="left", more…}
3
Object { name="hide", index="hide", align="left", more…}
4
Object { name="reqno", index="reqno", align="left", more…}
5
Object { name="start", index="start", align="left", more…}
6
Object { name="due", index="due", align="left", more…}
7
Object { name="offref", index="offref", width=57, more…}
8
Object { name="material", index="material", align="left", more…}
9
Object { name="description", index="description", align="left", more…}
10
Object { name="qty", index="qty", align="right", more…}
11
Object { name="nominal", index="nominal", align="left", more…}
12
Object { name="price", index="price", align="right", more…}
13
Object { name="unit", index="unit", width=47, more…}
14
Object { name="disc", index="disc", width=59, more…}
15
Object { name="charge", index="charge", width=71, more…}
16
Object { name="hire", index="hire", align="right", more…}
17
Object { name="net", index="net", width=81, more…}
18
Object { name="dow", index="dow", width=72, more…}
19
Object { name="matno", index="matno", hidden=true, more…}
20
Object { name="nomno", index="nomno", hidden=true, more…}
21
Object { name="hireqty", index="hireqty", width=41, more…}
22
Object { name="hirefreq", index="hirefreq", width=41, more…}

That 0 undefined is appearing from a remap ;

Hold up a moment though :  I examined the rv value of remap and set it to 0-count of columns ( -1 ) and it worked correctly . Which means the value of rv if it contains more indices than the columns your using then it makes  a problem for colModel[i] technically leaving the fault -- my bad ! lets close this while I go away and drink some more coffee; thanks for helping though.

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

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