Forum


20:39

06/07/2009

Hi,
I'm using jqGrid 3.5, ASP.NET MVC 1.0 and jQuery UI 1.7.2
The problem I'm having is that this function is failing after adding or editting items:
formatter=
function(rowId,cellval,colpos,rwdat,_act){var cm=ts.p.colModel[colpos],v;if(typeof cm.formatter!=="undefined"){var opts={rowId:rowId,colModel:cm};if($.isFunction(cm.formatter)){v=cm.formatter(cellval,opts,rwdat,_act)}else{if($.fmatter){v=$.fn.fmatter(cm.formatter,cellval,opts,rwdat,_act)}else{v=cellVal(cellval)}}}else{v=cellVal(cellval)}return
v},
On firebug and visual studio's debugger I can see that colpos = 4 which for my colModel is wrong because there's only 4 fields in it (colpos should be at most 3).
A strange thing is that if I add, get the error, and then refresh the page the grid displays all changes correctly.
I can provide the code I'm using and some sample json data.
Thanks in advance
05:47

Moderators
30/10/2007

Hello,
Publishing the code in your case is recommended.
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.
Most Users Ever Online: 715
Currently Online:
52 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.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66