Forum


09:52

16/09/2008

Using the basic template if I select a row the row background turns blue.
Any black cell color turns white (which is good) but if a cell color is specifically set with setCell
jQuery(â€#a_todayâ€).setCell(rowid,’l_wins’,â€,{color:’red’});
then that color will not change to white. This color clashes with some cells when they are highlighted.
Is it possible to force all selectedrow cell colors to white?
--------------
This is something I tried:
onSelectRow: function(id){
if(id && id!==lastsel){
var myrowdata = jQuery('#a_today').setCell(id,'name','',{color:'white'});
lastsel=id;
}
},
That sort of works in that it does change the cell color of name to white when the row is selected.
But if I then select another row it stays white (and thus is white on a white background - it doesn't go back to the original cell color.
04:30

Moderators
30/10/2007

Hello,
First I reccomend to define in CSS a class myclas, then
onSelectRow: function(id){
if(id && id!==lastsel){
jQuery(’#’+id).addClass("myclass");
jQuery(’#’+lastsel).removeClass("myclass");
lastsel=id;
}
}
This will work since the id is acctually the id of the selected row
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.
06:13

16/09/2008

Tony, I can use that method to change some css of the class but not the color.
.rowselected{color: #ff0000; font-size:20px}
—-
jQuery(’#'+id).addClass(’rowselected’);
jQuery(’#'+lastsel).removeClass(’rowselected’);
If I click on a row the row changes to 20px font size and reverts if I then click a differnt row. That proves this method does change the css.
Unfortunately the cell color stays exactly the same instead of being forced to red.
06:20

Moderators
30/10/2007

Hello,
try this:
.rowselected{ font-size:20px}
.rowselected td {color: #ff0000;}
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.
02:23

Moderators
30/10/2007

Hello,
Sorry I missed something
.rowselected tr td {color: #ff0000;} or
.rowselected tr>td {color: #ff0000;}
should work
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.
12:11

Moderators
30/10/2007

Hello,
I will try to prepare example of this.
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.
Most Users Ever Online: 715
Currently Online:
57 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