Setting a selected row as active element with specified color

When a user a selects a table row, the selected row's border must be highlighted with a specified color in a table, is there any possible method to highlight the selected row's border color?


Hi Dinesh, 

Through CSS. 

Take a look at this topic, please:


Hai Eduardo Jauch,

Thank You for the idea but i am looking alternate solution using javascript.

I am in need of onclick properties, Whenever i click a row it should be active with a specified color until i click another row the previous clicked row should be active and i am struggling here?

Hello Dinesh,

Is jquery acceptable in your javascript solution? if so, I believe you can add and remove CSS class easily with that.

Now what left is needed in your end is to identify the CSS classes defined for active, and add or remove those classes as needed inside your onclick event.

Hope this helps!

- Emman


Use extended row properties. Add onclick something like this ("document.getElementById('" +Table.Id +"').style.borderColor='#FF0000'").

 It is for all table border, but I hope you can find in google how define row border.

Good luck!

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.