Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

"highlight" row on a table

Status
Not open for further replies.

smsinger3

Programmer
Oct 5, 2000
192
US
Hello. I have a table with many rows, when someone clicks on a cell, I would like to highlight the entire row. This needs to work on all platforms and browsers (e.g. win/ie, win/ns, mac/ie, mac/ns).

Any ideas? I originally have this posted in the javascript forum, but then I was thinking maybe there is a asp.net thing I could do? Any html/javascrpt/net ideas?

Thanks!

Steve
 
I think you will need to use a combination of CSS with Javascript to perform this. Sorry I don't have an example.

 
try it out with:

onclick="this.style.bgcolor='red'"
or other similar statements...
I am not sure if it's called bgcolor or else but I use this:

onmouseover="this.style.color='red'" for my text links to change color instead of writing the usual javascript and it works like a charm

hth Daren J. Lahey
Just another computer guy...
If you are unsure of forum etiquette check here FAQ796-2540
 
not sure of a table but a datagrid has this built in. It's under a property called SelectedItemStyle.

Basically you need to set the tr background style to a color. HTML for this would be something like so.

<tr style=&quot;background-color:Red;&quot;> That'l do donkey, that'l do
[bravo] Mark
If you are unsure of forum etiquette check here faq796-2540
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top