Click here to Skip to main content
15,895,667 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
I am using table with div. This is not Grid. it is just HTML tag.

i have "n" number of columns and rows. when i scroll i am unable to see the header column and some wanted first column.

I want to highlight the entire row in one different color whenever the user select one cell in table.

How to highlight this...?
Posted
Updated 8-Feb-12 21:11pm
v3

1 solution

 
Share this answer
 
v2
Comments
Sergey Alexandrovich Kryukov 9-Feb-12 3:50am    
My 5.
--SA
gani7787 9-Feb-12 4:48am    
thanks for your reply.

But, when i click the row, it should highlight permenantly in that row. same as when i click another row, previous row make it is as visible false color then the current row should highlight if i click..

how it is porssible and how to do this...?
thatraja 9-Feb-12 4:57am    
Write the same code in onclick event
gani7787 9-Feb-12 5:29am    
I tried below simple code.

The color should highligh selected when i click the row. but it is not selected.

what is the problem ?

see my simple code below.
<tr onmouseover="this.style.cursor='hand';this.style.background='#f4ffcc';" önmouseout="this.style.background='#f4f4f4';" önclick="this.style.cursor='hand';this.style.background='#f4ffcc';">.
thatraja 9-Feb-12 5:39am    
I think the code on onmouseout event clears the color so change your condition in your code

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900