Forum
16:23
11/01/2010
Hello.
Version 3.8.2
I have a custom formatter for my field:
function Formatter_Currency(cellvalue, options, rowObject) {
return '<table><tr><td >$</td><td >' + cellvalue + '</td></tr></table>';
}
Also I have On cell select handler for jqGrid:
onCellSelect: function(rowid, iCol, cellcontent, e)
{
var data = $(gridNameSelector).jqGrid('getRowData', rowid);
}
Call of getRowData in this case will generate an exception.
File: grid.base.js
Line: 2482 : $('td',ind).each( function(i) {
Line: 2483 : nm = $t.p.colModel[i].name
ind is a context of row ('<tr>').
Exception will be generated at line 2482 because $('td',ind).length != $t.p.colModel[i].length, $('td',ind) searched all tds in row include tds generated by Formatter_Currency function.
As a temporary fix I can propose use selector: $('td[role="gridcell"]',ind) which includes to result only tds with role="gridcell" as attribute of row cell.
Please provide me with right fix in case if I'm not completely right with my fix.
Thanks!
p.s. Sorry for my bad english!
Thanks.
Most Users Ever Online: 715
Currently Online:
27 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