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_TopicIcon
Access to Cell Node From Formatter
22/12/2010
17:20
Avatar
KamiQuasi
New Member
Members
Forum Posts: 1
Member Since:
18/11/2008
sp_UserOfflineSmall Offline

This question has been asked in a number of ways, but I don't find the answers to be quite what I am looking for:

"Is there a way to change a cell's properties within a custom formatter?"

What I really want to know, though, is if there is a way to add or access a specific cell's HTML properties at the time the formatter is being run. The issue I have is that I want to change the class attribute of a cell based on it's formatted value, but to draw the row, and then go back and process each cell and their values seems to be redundant and very inefficient.

Is there some way of interacting with the rowObject or a specific cell while in a Custom Formatter (either through setCell or manually) that will allow me to change the HTML result that is written to the DOM for the specific cell it is attached to? 

It seems as though there must be a way to access the jqGrid object within the formatter before the DOM is written, but while a formatter is being executed on a cell. Has anyone successfully done this?

09/01/2011
15:59
Avatar
footcha
New Member
Members
Forum Posts: 1
Member Since:
09/01/2011
sp_UserOfflineSmall Offline

+1 for this feature request.

jqGrid is a great component.

I would really like to see in jqGrid API an option for custom formater to be the function receiving curren cell DOM.

Example of usage:

function customFormatter(cell)

{

    $(cell).click(function() {

        // do some advanced stuff here

    })

}

The point is to be able to attach to javascript events. I want to avoid the formatter to render html content that contains function names. I want my fuction to be anonymous.

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

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