How can I select a row by clicking on ANY column

J

John Wilmot

I am using the following to highlight a row when mousing over a GridView:

e.Row.Attributes.Add("onmouseover", "this.style.backgroundColor='Silver'");
e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor='White'");

Now, what I would like to do would seem simple, but apparently is not. I
would like to be able to select the row by clicking on any column within it.
Does anyone know the best way to do this?
 
J

John Wilmot

Thanks, this is helpful.

Strange that MS would neglect such an obvious need. I wonder what the reason
is?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,043
Latest member
CannalabsCBDReview

Latest Threads

Top