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
Set Cell Color
05/06/2010
02:54
Avatar
tjones1105
Member
Members
Forum Posts: 18
Member Since:
25/02/2010
sp_UserOfflineSmall Offline

Hello,

I was wondering if there was a way to change a cell's color based on it's value. For example, lets say I have  three columns "Name, Age, Sex" and if the age is over 30 then color just that cell in the Age column to yellow. 

Thanks,

tom

08/06/2010
16:16
Avatar
gvnsbt
Member
Members
Forum Posts: 17
Member Since:
12/12/2009
sp_UserOfflineSmall Offline

Hi tom.

I have same problem.

You found a solution to problem?

Regards.

Giovanni.

09/06/2010
07:26
Avatar
michaelg
Member
Members
Forum Posts: 51
Member Since:
10/04/2010
sp_UserOfflineSmall Offline

Hi there,

I will soon try to replace the tooltips on cell's in the following manner - it may or may not work, but if it does work you could use the same technique ...

1) make a custom formatter for the column, which will insert a hidden field with a known class name into each cell

2) once the grid is loaded, i'll search for all these hidden fields ( $(.clsHiddenField)) and iterate through them grabbing they're parent (ie. the cell)

3) set the cell's title attribute to whatever i like (you could set other attributes such as background colour etc.)

If anyone reading this has a nicer solution to setting the cell's tooltip please let me know Laugh

I hope this helps

Cheers,

Michael

16/06/2010
13:43
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Dear all,

Could you please look at the demo:

New in version 3.2 => afterInsertRow event.

This is exactley what you want.

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.

17/06/2010
02:28
Avatar
michaelg
Member
Members
Forum Posts: 51
Member Since:
10/04/2010
sp_UserOfflineSmall Offline

Thanks Tony,

Thats a much nicer solution Smile  I love your work

Cheers,

Michael

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

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