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
wrong priority in colModel template and colModel properties
05/02/2011
20:28
Avatar
OlegK
Germany
Member
Members
Forum Posts: 1255
Member Since:
10/08/2009
sp_UserOfflineSmall Offline

Hello Tony!

I found small bug in my original suggestion about the usage of templates for the colModel properties. The problem is that in the current implementation the settings from cmTemplate parameter of jqGrid or the template properties has higher priority as the settings from the colModel properties. If for example the width property exist in all template, cmTemplate and in colModel, the values from template insted of colModel property will be used. So I suggest to change the line 1895 of the grid.base.js from

clm = $.extend(clm, ts.p.cmTemplate, clm.template || {});

to

ts.p.colModel[i] = $.extend({}, ts.p.cmTemplate, clm.template || {}, clm);

Because the colModel templates are not yet described in the documentation, the feature will be probably not used and the problem which I describe here not found by other people.

Best regards

Oleg

21/03/2011
21:58
Avatar
OlegK
Germany
Member
Members
Forum Posts: 1255
Member Since:
10/08/2009
sp_UserOfflineSmall Offline

Sorry Tony,

but the line have to be changed one more time (How many errors one can make in one line of code?) from

ts.p.colModel[i] = $.extend({}, ts.p.cmTemplate, ts.p.colModel[i].template || {}, ts.p.colModel[i]);

to:

ts.p.colModel[i] = $.extend(true, {}, ts.p.cmTemplate, ts.p.colModel[i].template || {}, ts.p.colModel[i]);

I hope that it is the last my error in the column templates.

Best regards
Oleg 

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

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