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
getRowData in 3.8.2 generates exception when used field formatting with html table
01/04/2011
16:23
Avatar
office_rat
Member
Members
Forum Posts: 3
Member Since:
11/01/2010
sp_UserOfflineSmall Offline

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.

Forum Timezone: Europe/Sofia

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.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information