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
Set color of entire column?
19/11/2010
20:42
Avatar
alohaaaron
Member
Members
Forum Posts: 11
Member Since:
13/10/2010
sp_UserOfflineSmall Offline

Hi, I'm trying to set the color of the values in my Date column to red but only find syntax to set a single cell not the entire column.  Would I get the total rows displayed in the grid and then loop through them and set the color of the rowid one by one?

for (i = 0; i++; i < totalrowsingrid ) {

$("#mygrid").jqGrid("setCell",rowid,"Date","",{'font-weight': 'bold',color: 'red','text-align':'center'});

}

CORRECTION: even if I replace rowid with an actual row number in the example aboverit doesn't set the cell color.

This syntax works to change a single cell color but not the entire column

 $("#mygrid tr:nth-child(3) td:nth-child(2)").css("color", "red");

I've also tried to set this in the colmodel like this and it didn't show any changes.  I am using the custom theme redmond and have heard that it can prevent grid styles from being displayed?

<style>

.test {
 color: '#FF0000';

}

</style>

colModel :[

{name:'Date', index:'Date', width:70, align:'left',classes: 'test'}

]

Thanks!

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

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