Forum



20:42

13/10/2010

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!
Most Users Ever Online: 715
Currently Online:
65 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