In child repeater I have list of checkboxes and one of those checkboxes should be checked.
Main Topics
Browse All TopicsI have a repeater which shows current month records from database based upon month and year selection from dropdownlist at the top of page. This repeater has 3 textboxes per row (date of month) and a nested repeater. Nested repeater contains checkbox and is populated from database. I want to make sure using javascript and custom validators that at least one checkbox in each row should be selected.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Hello,
Got it, I have created a sample javascript for you, just paste it as a .html file and run locally and try pressing the submit button without selecting checkboxes in each row, it will give error and tell you that you have to select these many checkboxes atleast i.e. once per each row.
This is html and javascript , but looking at the code and html I have produced, you can easily port it in your repeater, just make sure you keep ids properly and change variables accordingly in this script.
Hope it solved your problem.
Happy Javascripting!
Also forgot to mention, after you get familiar with the script I posted above,
you will notice tht
there should be one single outer div element,
then elements like div1, div2 ... can probably be once per itemtemplate of repeater,
i.e. if you have two dataitems, you should render div1,div2... , if you have three dataitems, your repeater shoudl produce div1,div2,div3 like that.
Now inside of these divs (div1, div2... ) you can have your checkboxes.
ids of checkboxes doesn't matter as of now.
You can use this logic with two repeaters, or 1 repeater,
its just how you arrange the divs and how they render dynamically!
Business Accounts
Answer for Membership
by: techExtremePosted on 2008-10-30 at 11:02:24ID: 22843548
Hello,
Looking from your description, you seem to have
for each outer repeater item,
you hav 3 textboxes and 1 child repeater (which further down contains 1 checkbox).
But this means you only have 1 checkbox per item.
And you want to ensure all of these are selected?
I guess I'm missing something out here.