Forum


08:53

21/09/2010

I want to create a custom formatter for which the format of the cell is based on another cell in the same row.
For example, don't show a checkbox unless there is a certain name in another column. Or create a "mailto" link on a name where a different column is used for the subject value.
In my formatter, I try to use getCell or getRowData to look at another column's data, passing in options.rowid and the appropriate column name. But it always returns "undefined" or "false". Making the same call after the grid is loaded returns the correct value. So I'm guessing that that the grid data isn't available while the grid is being built.
So how can my formatter access the value in a different column?
For the purposes of this exercise, assume I have a column named "manager", and a checkbox column names "complete". The checkbox should only be displayed if there is a certain name in the "manager" column.
Most Users Ever Online: 715
Currently Online:
58 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