How to select row in Repeater when user clicks in any cell?

S

Stefan

Hi,
I've got a repeater control, that has a checkbox in the first column, and
then a couple of columns with data after that.
What i want to achieve, is that the checkbox in the first column gets
selected if the user clicks in any cell in that row, WITHOUT a postback! Just
like if he clicked directly in the checkbox.

Any ideas on how to do this? Any links maybe? (If possible without ajax, but
if only possible with ajax i'm interested in suggestions as well. )

Thanks
 
B

bruce barker

simple. on <tr> just add a little javascript:

<tr onclick="this.getElementsByTagName('input')[0].checked=true;">

-- bruce (sqlwork.com)
 

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

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top